結果

問題 No.231 めぐるはめぐる (1)
ユーザー tbeodtbeod
提出日時 2020-05-12 21:25:03
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 503 bytes
コンパイル時間 1,423 ms
コンパイル使用メモリ 164,548 KB
実行使用メモリ 4,480 KB
最終ジャッジ日時 2023-10-11 23:35:49
合計ジャッジ時間 3,783 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 1 ms
4,352 KB
testcase_02 AC 2 ms
4,368 KB
testcase_03 WA -
testcase_04 WA -
testcase_05 AC 2 ms
4,352 KB
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 AC 2 ms
4,356 KB
testcase_12 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;

int main() {
    int n;
    cin >> n;
    int MAX = -1;
    int MAX_d = -1;
    for (int i = 0; i < n; ++i) {
        int g, d;
        cin >> g >> d;
        if (g - 30000 * d > MAX) {
            MAX = g - 30000 * d;
            MAX_d = i;
        }
    }
    if (MAX * 6 >= 3000000) {
        cout << "YES" << endl;
        for (int i = 0; i < 6; ++i) {
            cout << MAX_d << endl;
        }
    }
    else {
        cout << "NO" << endl;
    }
}
0