結果

問題 No.355 数当てゲーム(2)
ユーザー TawaraTawara
提出日時 2016-04-02 00:01:12
言語 Python2
(2.7.18)
結果
AC  
実行時間 34 ms / 2,000 ms
コード長 713 bytes
コンパイル時間 94 ms
コンパイル使用メモリ 6,700 KB
実行使用メモリ 24,420 KB
平均クエリ数 25.29
最終ジャッジ日時 2023-09-23 23:32:47
合計ジャッジ時間 3,989 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 34 ms
24,048 KB
testcase_01 AC 33 ms
23,532 KB
testcase_02 AC 31 ms
23,640 KB
testcase_03 AC 28 ms
23,364 KB
testcase_04 AC 29 ms
23,532 KB
testcase_05 AC 29 ms
23,544 KB
testcase_06 AC 29 ms
23,412 KB
testcase_07 AC 29 ms
24,384 KB
testcase_08 AC 28 ms
24,408 KB
testcase_09 AC 28 ms
24,024 KB
testcase_10 AC 28 ms
24,204 KB
testcase_11 AC 28 ms
24,024 KB
testcase_12 AC 31 ms
23,376 KB
testcase_13 AC 30 ms
24,420 KB
testcase_14 AC 28 ms
23,424 KB
testcase_15 AC 28 ms
24,384 KB
testcase_16 AC 28 ms
23,988 KB
testcase_17 AC 28 ms
23,436 KB
testcase_18 AC 28 ms
23,376 KB
testcase_19 AC 28 ms
24,264 KB
testcase_20 AC 28 ms
23,544 KB
testcase_21 AC 28 ms
23,436 KB
testcase_22 AC 29 ms
23,532 KB
testcase_23 AC 27 ms
24,324 KB
testcase_24 AC 29 ms
24,400 KB
testcase_25 AC 28 ms
23,832 KB
testcase_26 AC 30 ms
23,664 KB
testcase_27 AC 29 ms
23,416 KB
testcase_28 AC 28 ms
23,712 KB
testcase_29 AC 30 ms
23,820 KB
testcase_30 AC 32 ms
24,052 KB
testcase_31 AC 27 ms
23,956 KB
testcase_32 AC 28 ms
23,652 KB
testcase_33 AC 28 ms
24,036 KB
testcase_34 AC 28 ms
23,428 KB
testcase_35 AC 28 ms
23,376 KB
testcase_36 AC 29 ms
24,028 KB
testcase_37 AC 28 ms
23,968 KB
testcase_38 AC 30 ms
23,968 KB
testcase_39 AC 28 ms
23,428 KB
testcase_40 AC 30 ms
23,664 KB
testcase_41 AC 28 ms
24,280 KB
testcase_42 AC 27 ms
23,416 KB
testcase_43 AC 28 ms
24,064 KB
testcase_44 AC 30 ms
23,640 KB
testcase_45 AC 29 ms
24,048 KB
testcase_46 AC 28 ms
23,640 KB
testcase_47 AC 29 ms
23,652 KB
testcase_48 AC 28 ms
23,416 KB
testcase_49 AC 29 ms
23,400 KB
testcase_50 AC 30 ms
23,392 KB
testcase_51 AC 29 ms
23,812 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
numbers = set(map(str,range(10)))
N = ["0","1","2","3"]
for i in xrange(4):
	nlist = list(numbers)
	l = nlist[:7]
	r = nlist[7:]
	## left
	n = N[:i]+["0"]+r
	res = []
	for j in l:
		n[i] = j
		print " ".join(n)
		sys.stdout.flush()
		x,y = map(int,raw_input().split())
		if x == 4:
			quit()
		res.append([x,j])
	if max(res)[0] > min(res)[0]:
		N[i] = max(res)[1]
		numbers.remove(N[i])
		continue
	## right
	n = N[:i]+["0"]+l[:3-i]
	res = []
	for j in r:
		n[i] = j
		print " ".join(n)
		sys.stdout.flush()
		x,y = map(int,raw_input().split())
		if x == 4:
			quit()
		res.append([x,j])
	N[i] = max(res)[1]
	numbers.remove(N[i])
print " ".join(N)
sys.stdout.flush()
x,y = map(int,raw_input().split())
0