結果

問題 No.282 おもりと天秤(2)
ユーザー ayame_pyayame_py
提出日時 2015-10-14 05:49:16
言語 Python2
(2.7.18)
結果
AC  
実行時間 3,512 ms / 5,000 ms
コード長 485 bytes
コンパイル時間 110 ms
コンパイル使用メモリ 6,536 KB
実行使用メモリ 24,420 KB
平均クエリ数 440.67
最終ジャッジ日時 2023-09-23 21:53:58
合計ジャッジ時間 32,638 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 40 ms
23,592 KB
testcase_01 AC 53 ms
23,484 KB
testcase_02 AC 40 ms
23,988 KB
testcase_03 AC 35 ms
23,484 KB
testcase_04 AC 35 ms
23,448 KB
testcase_05 AC 45 ms
24,120 KB
testcase_06 AC 58 ms
23,988 KB
testcase_07 AC 36 ms
23,616 KB
testcase_08 AC 59 ms
24,420 KB
testcase_09 AC 34 ms
24,180 KB
testcase_10 AC 890 ms
24,144 KB
testcase_11 AC 3,128 ms
23,448 KB
testcase_12 AC 994 ms
24,276 KB
testcase_13 AC 1,494 ms
24,288 KB
testcase_14 AC 2,617 ms
24,264 KB
testcase_15 AC 3,246 ms
23,484 KB
testcase_16 AC 226 ms
23,304 KB
testcase_17 AC 1,438 ms
23,976 KB
testcase_18 AC 2,256 ms
23,592 KB
testcase_19 AC 2,367 ms
23,988 KB
testcase_20 AC 3,373 ms
23,292 KB
testcase_21 AC 3,512 ms
23,988 KB
testcase_22 AC 3,482 ms
24,264 KB
testcase_23 AC 34 ms
24,096 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
N=int(raw_input())
a = [i+1 for i in range(N)]
z = [0 for i in range(1500)]
z=' '.join(map(str,z))
for i in range(N*2):
	l=i%2
	r=l+int((N-l)/2)*2
	q=' '.join(map(str, a[l:r]))
	if (r-l)!=0:q=q[0:r*4]+' '+z[0:(N-(N-l)/2)*4]
	else:q=z[0:(N-(N-l)/2)*4]
	print '?',q[0:len(q)-1]
	sys.stdout.flush()
	c=raw_input().split()
	for j in range((N-l)/2):
		if c[j]=='>':a[j*2+i%2],a[j*2+i%2+1]=a[j*2+i%2+1],a[j*2+i%2]
a=' '.join(map(str, a))
print '!',a
sys.stdout.flush()
sys.exit()
0