結果

問題 No.231 めぐるはめぐる (1)
ユーザー Noiri
提出日時 2019-04-01 11:10:14
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 1,000 ms
コード長 406 bytes
コンパイル時間 1,509 ms
コンパイル使用メモリ 166,968 KB
実行使用メモリ 6,820 KB
最終ジャッジ日時 2024-11-24 17:50:15
合計ジャッジ時間 2,233 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 11
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;

int main(){
    long long n, g, d, need;
    need = 30000 * 100;
    cin >> n;
    int ans = -1;
    for(int i=0; i<n; i++){
        cin >> g >> d;
        if(need <= 6 * (g - 30000*d)) ans = i+1;
    }
    if(ans == -1) cout << "NO" << endl;
    else {
        cout << "YES" << endl;
        for(int i=0; i<6; i++) cout << ans << endl;
    }

    return 0;
}
0