結果
問題 | No.282 おもりと天秤(2) |
ユーザー |
![]() |
提出日時 | 2016-05-13 17:35:27 |
言語 | PyPy2 (7.3.15) |
結果 |
TLE
|
実行時間 | - |
コード長 | 793 bytes |
コンパイル時間 | 879 ms |
コンパイル使用メモリ | 77,440 KB |
実行使用メモリ | 116,856 KB |
平均クエリ数 | 123.42 |
最終ジャッジ日時 | 2024-07-16 10:08:59 |
合計ジャッジ時間 | 13,033 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 11 TLE * 1 -- * 12 |
ソースコード
import sys N=int(raw_input()) ans=[] used=[False for i in range(N+1)] used[0]=True for n in range(N): cand = [i for i in range(N+1) if used[i]==False] while len(cand)>=2: print '?', for c in cand: print c, for d in range(N*2-len(cand)): print 0, print sys.stdout.flush() ncand=[] res=raw_input().split() for i in range(0,len(cand),2): if i==len(cand)-1: ncand.append(cand[i]) elif res[i/2]=='>': ncand.append(cand[i+1]) elif res[i/2]=='<': ncand.append(cand[i]) cand=ncand ans.append(cand[0]) used[cand[0]]=True print '!', for a in ans: print a, print sys.stdout.flush()