結果
問題 | No.231 めぐるはめぐる (1) |
ユーザー |
|
提出日時 | 2016-06-02 18:35:40 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 1,000 ms |
コード長 | 502 bytes |
コンパイル時間 | 802 ms |
コンパイル使用メモリ | 64,128 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-08 00:19:37 |
合計ジャッジ時間 | 1,131 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 11 |
コンパイルメッセージ
main.cpp:9:5: warning: built-in function 'exp' declared as non-function [-Wbuiltin-declaration-mismatch] 9 | int exp = 0; | ^~~
ソースコード
#include <iostream> using namespace std; int n; int g[1000000]; int d[1000000]; int a = 0; int exp = 0; int m = 0; int ans = 0; int main(){ cin >> n; for(int i = 0; i < n; i++){ cin >> g[i] >> d[i]; } m = g[0] - (30000 * d[0]); for(int i = 1; i < n; i++){ exp = g[i] - (30000 * d[i]); if(m < exp){ m = exp; a = i; } } ans = m * 6; if(ans >= 3000000){ cout << "YES" << endl; for(int i = 0; i < 6; i++){ cout << a + 1 << endl; } }else{ cout << "NO" << endl; } }