結果
問題 | No.2124 Guess the Permutation |
ユーザー |
👑 |
提出日時 | 2022-11-18 21:22:51 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 131 ms / 2,000 ms |
コード長 | 277 bytes |
コンパイル時間 | 182 ms |
コンパイル使用メモリ | 82,432 KB |
実行使用メモリ | 86,616 KB |
平均クエリ数 | 374.60 |
最終ジャッジ日時 | 2024-09-20 01:48:04 |
合計ジャッジ時間 | 1,810 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 9 |
ソースコード
n = int(input())def ask(l, r):print("?", l, r, flush=True)return int(input())x = ask(2, n)P = [0] * nP[0] = n * (n + 1) // 2 - xtot = P[0]for r in range(2, n):x = ask(1, r)P[r - 1] = x - tottot = xP[-1] = n * (n + 1) // 2 - totprint("!", *P)