結果

問題 No.231 めぐるはめぐる (1)
ユーザー focusfocus
提出日時 2018-02-21 01:09:07
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 3 ms / 1,000 ms
コード長 453 bytes
コンパイル時間 1,171 ms
コンパイル使用メモリ 69,384 KB
実行使用メモリ 4,372 KB
最終ジャッジ日時 2023-10-11 17:12:44
合計ジャッジ時間 1,619 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

#include<iostream>
#include<vector>
#include<algorithm>
#include<string>
#include<cstdio>
using namespace std;
int main(){
    long long N,G,D,m=0,i,ans=0;
    cin >> N;
    for(i=0;i<N;i++){
        cin >> G >> D;
        if(m<(G-30000*D)){
            m = G-30000*D;
            ans = i+1;
        }
    }
    if(3000000>m*6)  cout << "NO\n";
    else{
        cout <<"YES\n";
        for(i=0;i<6;i++)    cout << ans << endl;
    }    
    return 0;
}
0