結果

問題 No.305 鍵(2)
ユーザー 🐬hec🐬hec
提出日時 2015-11-27 23:13:07
言語 C++11
(gcc 11.4.0)
結果
AC  
実行時間 31 ms / 2,000 ms
コード長 419 bytes
コンパイル時間 3,224 ms
コンパイル使用メモリ 144,916 KB
実行使用メモリ 24,372 KB
平均クエリ数 86.69
最終ジャッジ日時 2023-09-23 22:03:53
合計ジャッジ時間 2,452 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 31 ms
23,364 KB
testcase_01 AC 24 ms
23,412 KB
testcase_02 AC 25 ms
23,364 KB
testcase_03 AC 25 ms
23,532 KB
testcase_04 AC 25 ms
23,532 KB
testcase_05 AC 26 ms
23,628 KB
testcase_06 AC 23 ms
24,264 KB
testcase_07 AC 28 ms
23,652 KB
testcase_08 AC 27 ms
23,532 KB
testcase_09 AC 25 ms
24,372 KB
testcase_10 AC 25 ms
24,048 KB
testcase_11 AC 26 ms
23,628 KB
testcase_12 AC 26 ms
23,520 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#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;
}
0