結果

問題 No.305 鍵(2)
ユーザー QCFiumQCFium
提出日時 2020-06-16 18:31:43
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 571 bytes
コンパイル時間 1,397 ms
コンパイル使用メモリ 161,768 KB
実行使用メモリ 24,540 KB
平均クエリ数 1.00
最終ジャッジ日時 2023-09-24 03:40:43
合計ジャッジ時間 4,828 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 AC 20 ms
23,676 KB
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>

int main() {
	puts("0000000000");
	return 0;
	char res[11] = { 0 };
	char tmp[11] = { 0 };
	for (int i = 0; i < 10; i++) tmp[i] = '0';
	for (int i = 0; i < 10; i++) {
		int max = -1, index = -1;
		for (int j = 0; j < 10; j++) {
			tmp[i] += j;
			puts(tmp);
			fflush(stdout);
			int match;
			scanf("%d%*s", &match);
			if (match == 10) return 0;
			if (match < max) break;
			if (match == -1) {
				index = j;
				break;
			}
			if (match > max) max = match, index = j;
			tmp[i] -= j;
		}
		res[i] = index + '0';
	}
	puts(res);
	return 0;
}

0