結果
| 問題 | No.231 めぐるはめぐる (1) |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2019-06-21 00:45:47 |
| 言語 | C++11 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 1,000 ms |
| コード長 | 404 bytes |
| 記録 | |
| コンパイル時間 | 337 ms |
| コンパイル使用メモリ | 77,940 KB |
| 実行使用メモリ | 6,400 KB |
| 最終ジャッジ日時 | 2026-05-29 06:39:33 |
| 合計ジャッジ時間 | 1,319 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 11 |
コンパイルメッセージ
main.cpp: In function 'int main()':
main.cpp:20:18: warning: 'ok' may be used uninitialized [-Wmaybe-uninitialized]
20 | cout << ok+1 << endl;
| ^
main.cpp:6:7: note: 'ok' was declared here
6 | int ok;
| ^~
ソースコード
#include <iostream>
#include <cmath>
using namespace std;
int main(){
int n;cin>>n;
int ok;
int okpr = 0;
for(int i = 0; n > i; i++){
int g,d;
cin >> g >> d;
if(okpr < g-(30000*d)){
ok = i;
okpr = g-(30000*d);
}
}
if(okpr*6 < 30000*100)cout << "NO" << endl;
else{
cout << "YES" << endl;
for(int i = 0; 6 > i; i++){
cout << ok+1 << endl;
}
}
}