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