結果
問題 | No.305 鍵(2) |
ユーザー |
![]() |
提出日時 | 2015-11-27 23:13:07 |
言語 | C++11 (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 27 ms / 2,000 ms |
コード長 | 419 bytes |
コンパイル時間 | 1,349 ms |
コンパイル使用メモリ | 158,296 KB |
実行使用メモリ | 25,476 KB |
平均クエリ数 | 86.69 |
最終ジャッジ日時 | 2024-07-16 21:49:55 |
合計ジャッジ時間 | 2,674 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 13 |
ソースコード
#include <bits/stdc++.h>#define rep(i,n) for(int (i)=0;(i)<(n);(i)++)using namespace std;string a="0000000000",b;void dfs(int pos){if(pos==10) return ;int res[10];rep(i,10){a[pos]=i+'0';cout << a << endl;cout.flush();cin >> res[i] >> b;if(res[i]==10) return;}int idx=0;rep(i,10) if(res[i]>res[idx]) idx=i;a[pos]=idx+'0';dfs(pos+1);return;}int main(void){dfs(0);return 0;}