結果

問題 No.305 鍵(2)
ユーザー dnishdnish
提出日時 2017-07-10 01:07:57
言語 C++14
(gcc 13.2.0 + boost 1.83.0)
結果
AC  
実行時間 26 ms / 2,000 ms
コード長 430 bytes
コンパイル時間 1,446 ms
コンパイル使用メモリ 165,784 KB
実行使用メモリ 24,348 KB
平均クエリ数 44.08
最終ジャッジ日時 2023-09-24 01:21:53
合計ジャッジ時間 2,859 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 26 ms
24,348 KB
testcase_01 AC 22 ms
23,340 KB
testcase_02 AC 20 ms
23,316 KB
testcase_03 AC 20 ms
24,252 KB
testcase_04 AC 22 ms
23,424 KB
testcase_05 AC 22 ms
24,012 KB
testcase_06 AC 20 ms
23,340 KB
testcase_07 AC 23 ms
23,544 KB
testcase_08 AC 21 ms
23,724 KB
testcase_09 AC 23 ms
23,328 KB
testcase_10 AC 21 ms
23,628 KB
testcase_11 AC 22 ms
23,712 KB
testcase_12 AC 22 ms
23,736 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
#define REP(i,n,N) for(int i=(n);i<(int) N;i++)
#define p(s) cout<<(s)<<endl
using namespace std;

int main(){
	string s="0000000000",tmp;
	int ok;
	p(s);
	cin>>ok>>tmp;
	if(ok == 10) return 0;
	int cnt=ok;
	REP(i,0,10){
		REP(j,0,10){
			s[i]++;
			p(s);
			cin>>ok>>tmp;
			if(ok == 10) return 0;
			if(cnt<ok){
				cnt=ok;
				break;
			}else if(cnt>ok){
				s[i]--;
				break;
			}
		}
	}
	return 0;
}
0