結果
問題 |
No.282 おもりと天秤(2)
|
ユーザー |
|
提出日時 | 2016-10-20 01:39:32 |
言語 | Python2 (2.7.18) |
結果 |
RE
|
実行時間 | - |
コード長 | 531 bytes |
コンパイル時間 | 355 ms |
コンパイル使用メモリ | 7,040 KB |
実行使用メモリ | 25,616 KB |
平均クエリ数 | 916.67 |
最終ジャッジ日時 | 2024-07-16 11:17:08 |
合計ジャッジ時間 | 19,433 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | RE * 11 TLE * 1 -- * 12 |
ソースコード
import sys def ask(L): print '? ' + ' '.join(map(str, L)) sys.stdout.flush() return raw_input().split() N = int(raw_input()) A = range(1, N+1) + [0]*N for i in xrange(2000): if i % 2 == 0: ans = ask(A) for j in xrange(N/2): if ans[j] == '>': A[j*2], A[j*2+1] = A[j*2+1], A[j*2] else: ans = ask(A[1:]+[0]) for j in xrange(N/2-1+N%2): if ans[j] == '>': A[j*2+1], A[j*2+2] = A[j*2+2], A[j*2+1] print '! ' + ' '.join(A[:N])