結果

問題 No.231 めぐるはめぐる (1)
ユーザー chiyoda
提出日時 2016-06-28 08:33:37
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
AC  
実行時間 2 ms / 1,000 ms
コード長 449 bytes
コンパイル時間 552 ms
コンパイル使用メモリ 58,460 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-11-08 00:23:53
合計ジャッジ時間 1,799 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 11
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <algorithm>
#include <string>
using namespace std;
#define rep(i,n) for (int i =0; i<n; ++i)

int main () {
  int n;
  cin>>n;
  int g[n], d[n];
  rep(i,n) cin >>g[i]>>d[i];
  rep(i,n) g[i] -=30000*d[i];
  int maxi = 0;
  rep(i,n) if (g[i] > g[maxi]) maxi=i;
  string res;
  if (g[maxi]*6>=3000000) {
    cout << "YES" << endl;
    rep(i,6) cout << maxi+1 << endl;
  } else {
    cout << "NO" << endl;
  } 
  return 0;
}
0