結果

問題 No.231 めぐるはめぐる (1)
ユーザー kuisibakuisiba
提出日時 2016-04-09 21:23:53
言語 C++11
(gcc 11.4.0)
結果
WA  
実行時間 -
コード長 756 bytes
コンパイル時間 496 ms
コンパイル使用メモリ 63,316 KB
実行使用メモリ 6,948 KB
最終ジャッジ日時 2024-04-14 23:32:48
合計ジャッジ時間 1,685 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main() {

    std::ios::sync_with_stdio(false);
    std::cin.tie(0);

//必要経験値3 000 000, デスペナ30 000

    int n;
    cin >> n;
    vector<int> kouritu;
    int a, b;
    for (int i = 0; i < n; i++) {
        cin >> a >> b;
        kouritu.push_back(a - 30000 * b);
    }
    int dungeonNum = static_cast<int>(max_element(kouritu.begin(), kouritu.end()) - kouritu.begin());
    int jikyu = *max_element(kouritu.begin(), kouritu.end());
    if (jikyu * 6 > 3000000) {
        cout << "YES" << endl;
        for (int i = 0; i < 6; ++i) {
            cout << dungeonNum + 1 << endl;
        }
    } else {
        cout << "NO" << endl;
    }
    return 0;
}
0