結果

問題 No.231 めぐるはめぐる (1)
ユーザー oooooba
提出日時 2021-01-30 20:43:31
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 3 ms / 1,000 ms
コード長 708 bytes
コンパイル時間 958 ms
コンパイル使用メモリ 103,340 KB
最終ジャッジ日時 2025-01-18 10:01:09
ジャッジサーバーID
(参考情報)
judge2 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 11
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <algorithm>
#include <array>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <numeric>
#include <optional>
#include <queue>
#include <unordered_map>
#include <unordered_set>
#include <vector>

using namespace std;

int main() {
    int32_t n;
    cin >> n;
    int32_t e = -1, x = 0;
    for (auto i = 0; i < n; ++i) {
        int32_t g, d;
        cin >> g >> d;
        auto t = g - 30000 * d;
        if (e < t) {
            e = t;
            x = i + 1;
        }
    }
    if (e * 6 >= 30000 * 100) {
        cout << "YES" << endl;
        for (auto i = 0; i < 6; ++i) {
            cout << x << endl;
        }
    } else {
        cout << "NO" << endl;
    }
    return 0;
}
0