結果
問題 | No.305 鍵(2) |
ユーザー | mamekin |
提出日時 | 2015-12-20 20:38:36 |
言語 | C++11 (gcc 11.4.0) |
結果 |
AC
|
実行時間 | 29 ms / 2,000 ms |
コード長 | 910 bytes |
コンパイル時間 | 1,684 ms |
コンパイル使用メモリ | 88,656 KB |
実行使用メモリ | 24,240 KB |
平均クエリ数 | 52.15 |
最終ジャッジ日時 | 2023-09-23 22:30:55 |
合計ジャッジ時間 | 2,638 ms |
ジャッジサーバーID (参考情報) |
judge12 / judge11 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 28 ms
23,844 KB |
testcase_01 | AC | 26 ms
24,036 KB |
testcase_02 | AC | 27 ms
23,268 KB |
testcase_03 | AC | 27 ms
23,220 KB |
testcase_04 | AC | 27 ms
23,220 KB |
testcase_05 | AC | 29 ms
23,364 KB |
testcase_06 | AC | 26 ms
24,168 KB |
testcase_07 | AC | 28 ms
24,180 KB |
testcase_08 | AC | 28 ms
23,424 KB |
testcase_09 | AC | 27 ms
23,424 KB |
testcase_10 | AC | 27 ms
23,556 KB |
testcase_11 | AC | 28 ms
24,036 KB |
testcase_12 | AC | 28 ms
24,240 KB |
ソースコード
#include <cstdio> #include <iostream> #include <sstream> #include <fstream> #include <iomanip> #include <algorithm> #include <cmath> #include <string> #include <vector> #include <list> #include <queue> #include <stack> #include <set> #include <map> #include <bitset> #include <numeric> #include <limits> #include <climits> #include <cfloat> #include <functional> using namespace std; int main() { string s(10, '0'); for(int i=0; ; ++i){ int prev = -1; for(char c='0'; ; ++c){ s[i] = c; cout << s << endl; int curr; string t; cin >> curr >> t; if(t == "unlocked") return 0; if(c == '0'){ prev = curr; } else if(curr != prev){ if(curr < prev) s[i] = '0'; break; } } } }