結果

問題 No.231 めぐるはめぐる (1)
コンテスト
ユーザー kekenx
提出日時 2020-07-23 18:56:13
言語 C++14
(gcc 15.2.0 + boost 1.89.0)
コンパイル:
g++-15 -O2 -lm -std=c++14 -Wuninitialized -DONLINE_JUDGE -o a.out _filename_
実行:
./a.out
結果
AC  
実行時間 2 ms / 1,000 ms
コード長 459 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 1,169 ms
コンパイル使用メモリ 182,644 KB
実行使用メモリ 7,844 KB
最終ジャッジ日時 2026-03-08 21:43:16
合計ジャッジ時間 2,016 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 11
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

#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;
}
0