結果
| 問題 |
No.282 おもりと天秤(2)
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2016-10-20 01:38:38 |
| 言語 | Python2 (2.7.18) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 543 bytes |
| コンパイル時間 | 356 ms |
| コンパイル使用メモリ | 7,040 KB |
| 実行使用メモリ | 25,964 KB |
| 平均クエリ数 | 3.00 |
| 最終ジャッジ日時 | 2024-07-16 11:16:11 |
| 合計ジャッジ時間 | 6,380 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | RE * 24 |
ソースコード
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 A
print '! ' + ' '.join(A[:N])