結果
| 問題 | No.231 めぐるはめぐる (1) | 
| コンテスト | |
| ユーザー |  saytakaPC | 
| 提出日時 | 2015-10-21 16:58:59 | 
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 2 ms / 1,000 ms | 
| コード長 | 712 bytes | 
| コンパイル時間 | 1,370 ms | 
| コンパイル使用メモリ | 164,844 KB | 
| 実行使用メモリ | 5,248 KB | 
| 最終ジャッジ日時 | 2024-11-08 00:04:58 | 
| 合計ジャッジ時間 | 2,028 ms | 
| ジャッジサーバーID (参考情報) | judge4 / judge3 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 2 | 
| other | AC * 11 | 
ソースコード
#include <bits/stdc++.h>
#define PB push_back
#define MP make_pair
#define REP(i,n) for (int i=0;i<(n);i++)
#define FOR(i,a,b) for(int i=(a);i<(b);i++)
#define ALL(a) (a).begin(),(a).end()
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int,int> P;
const int INF=1e9;
const int MOD=100000;
int B=1000000;
int main(){
      vector<P> V;
      int n,g,d;
      cin>>n;
      REP(i,n){
            cin>>g>>d;
            V.PB(P(g-(d*30000),i));
      }
      sort(V.begin(),V.end(),greater<P>());
      int sum=V[0].first*6;
      if(sum<3000000){
            cout<<"NO"<<endl;
            return 0;
      }
      cout<<"YES"<<endl;
      REP(i,6)cout<<V[0].second+1<<endl;
}
            
            
            
        