結果
問題 |
No.305 鍵(2)
|
ユーザー |
![]() |
提出日時 | 2016-08-12 00:10:13 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 758 bytes |
コンパイル時間 | 639 ms |
コンパイル使用メモリ | 78,316 KB |
実行使用メモリ | 25,604 KB |
平均クエリ数 | 101.00 |
最終ジャッジ日時 | 2024-07-16 10:51:02 |
合計ジャッジ時間 | 3,554 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | WA * 13 |
ソースコード
#include <iostream> #include <fstream> #include <vector> #include <cstring> #include <string> #include <algorithm> #include <iomanip> using namespace std; template<typename T> void setmin(T& a, T b) { a = min(a, b); } template<typename T> void setmax(T& a, T b) { a = max(a, b); } int main() { cin.tie(0); ios::sync_with_stdio(false); string ans = "0000000000", res; int pn; cout << ans << endl; cin >> pn >> res; if(res == "unloced") return 0; for(int i = 0; i < 10; i++) { int n = pn, maxj, maxn = -1; for(int j = 0; j < 10; j++) { ans[j] = '0' + j; cout << ans << endl; cin >> n >> res; if(res == "unloced") return 0; if(maxn == -1 || maxn < n) { maxj = j; maxn = n; } } ans[i] = '0' + maxn; pn = maxn; } }