結果
| 問題 | No.231 めぐるはめぐる (1) | 
| コンテスト | |
| ユーザー |  kekenx | 
| 提出日時 | 2020-07-23 18:56:13 | 
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 2 ms / 1,000 ms | 
| コード長 | 459 bytes | 
| コンパイル時間 | 1,646 ms | 
| コンパイル使用メモリ | 166,536 KB | 
| 実行使用メモリ | 6,944 KB | 
| 最終ジャッジ日時 | 2024-06-23 17:53:30 | 
| 合計ジャッジ時間 | 2,656 ms | 
| ジャッジサーバーID (参考情報) | judge1 / judge4 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 2 | 
| other | AC * 11 | 
ソースコード
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const ll INF = 1e18;
int main() {
  int n;
  cin >> n;
  ll ma = -INF;
  int idx = -1;
  for (int i = 0; i < n; ++i) {
    ll G, D;
    cin >> G >> D;
    ll tmp = G - 30000 * D;
    if (tmp > ma) {
      ma = tmp;
      idx = i;
    }
  }
  if (ma * 6 >= 30000 * 100) {
    puts("YES");
    for (int i = 0; i < 6; ++i) cout << idx + 1 << '\n';
  } else {
    puts("NO");
  }
  return 0;
}
            
            
            
        