結果

問題 No.231 めぐるはめぐる (1)
ユーザー keisuke6
提出日時 2022-07-13 13:07:19
言語 C++23
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 3 ms / 1,000 ms
コード長 412 bytes
コンパイル時間 3,186 ms
コンパイル使用メモリ 244,292 KB
実行使用メモリ 6,948 KB
最終ジャッジ日時 2024-06-24 12:39:08
合計ジャッジ時間 3,719 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 11
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
#define int long long
signed main(){
  int N;
  cin>>N;
  int ans = 0;
  int best = 0;
  for(int i=0;i<N;i++){
      int g,d;
      cin>>g>>d;
      int x = g-30000*d;
      if(x > best){
          ans = i+1;
          best = x;
      }
  }
  if(best*6 >= 3000000){
      cout<<"YES"<<endl;
      for(int i=0;i<6;i++) cout<<ans<<endl;
  }
  else cout<<"NO"<<endl;
}
0