結果
問題 | No.305 鍵(2) |
ユーザー |
|
提出日時 | 2018-06-03 14:20:46 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 29 ms / 2,000 ms |
コード長 | 627 bytes |
コンパイル時間 | 721 ms |
コンパイル使用メモリ | 66,556 KB |
実行使用メモリ | 25,476 KB |
平均クエリ数 | 86.46 |
最終ジャッジ日時 | 2024-07-17 01:45:35 |
合計ジャッジ時間 | 2,256 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 13 |
ソースコード
#include<iostream> using namespace std; int main(){ string key = "0000000000"; int maxscore, nextnum, judgeN; string tmpkey,judgeS; for(int i = 0; i < 10; i++){ maxscore = -1; tmpkey = key; for(int j = 0; j < 10; j++){ nextnum = (key[i]-'0'+1)%10; key[i] = (char)('0'+nextnum); cout << key << endl << flush; cin >> judgeN >> judgeS; if(judgeS == "unlocked") return 0; if(judgeN > maxscore){ maxscore = judgeN; tmpkey = key; } } key = tmpkey; } }