結果

問題 No.231 めぐるはめぐる (1)
ユーザー chakkuchakku
提出日時 2015-09-24 16:38:27
言語 C++11
(gcc 11.4.0)
結果
WA  
実行時間 -
コード長 654 bytes
コンパイル時間 599 ms
コンパイル使用メモリ 63,340 KB
実行使用メモリ 4,380 KB
最終ジャッジ日時 2023-09-26 14:49:15
合計ジャッジ時間 3,046 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 1 ms
4,380 KB
testcase_02 AC 2 ms
4,380 KB
testcase_03 WA -
testcase_04 WA -
testcase_05 AC 2 ms
4,380 KB
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 AC 2 ms
4,380 KB
testcase_12 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <algorithm>
#include <vector>
using namespace std;

#define REP(i,n) for(int i=0;i<n;i++)
#define debug(x) cout<<#x<<":"<<x<<endl

int N;
int G[1024],D[1024];
int W[1024];
int Need;

int main(){
    cin>>N;
    REP(i,N) cin>>G[i]>>D[i];
    REP(i,N) W[i]=G[i]-D[i]*30000;
    Need=30000*100;
    int mx=0;
    REP(i,N) mx=max(mx,W[i]);
    vector<int> num;
    REP(i,N){
        if(mx==W[i]){       
            num.push_back(i+1);
        }
    }
    if(mx*6<Need){
        cout<<"NO"<<endl;
    }else{
        cout<<"YES"<<endl;
        for(int i=0;i<6;i++){
            cout<<num[i]<<endl;
        }
    }
    return 0;
}
0