結果
| 問題 | No.231 めぐるはめぐる (1) | 
| コンテスト | |
| ユーザー |  | 
| 提出日時 | 2019-07-30 02:26:14 | 
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 2 ms / 1,000 ms | 
| コード長 | 459 bytes | 
| コンパイル時間 | 1,740 ms | 
| コンパイル使用メモリ | 192,460 KB | 
| 最終ジャッジ日時 | 2025-01-07 10:03:53 | 
| ジャッジサーバーID (参考情報) | judge1 / judge5 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 2 | 
| other | AC * 11 | 
ソースコード
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
    int n;
    cin >> n;
    int mx = 0;
    int dun = 1;
    for (int i = 0; i < n; i++) {
        int g, d;
        cin >> g >> d;
        if (g - 30000*d > mx) {
            mx = g - 30000*d;
            dun = i+1;
        }
    }
    if (6*mx >= 3000000) {
        puts("YES");
        for (int i = 0; i < 6; i++) cout << dun << endl;
    } else puts("NO");
    return 0;
}
            
            
            
        