結果
問題 |
No.2577 Simple Permutation Guess
|
ユーザー |
|
提出日時 | 2023-12-06 19:19:26 |
言語 | PyPy3 (7.3.15) |
結果 |
RE
|
実行時間 | - |
コード長 | 240 bytes |
コンパイル時間 | 540 ms |
コンパイル使用メモリ | 82,560 KB |
実行使用メモリ | 82,272 KB |
平均クエリ数 | 0.91 |
最終ジャッジ日時 | 2024-09-27 01:44:11 |
合計ジャッジ時間 | 14,147 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | RE * 1 |
other | RE * 111 |
ソースコード
R=range(n:=int(input()));f=[1] for i in R(n):f+=f[-1]*-~i, def a(t): m=[0]*n;s=[*R] for i in R:m[i]=s.pop(t//f[n-i-1])+1;t%=f[n-i-1] return m l,r=0,f[n] while l+1<r: print("?",*a(m:=l+r>>1)) if'0'<input():l=m else:r=m print('!',*a(l))