結果
問題 |
No.2124 Guess the Permutation
|
ユーザー |
👑 |
提出日時 | 2023-10-27 08:29:56 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 272 bytes |
コンパイル時間 | 96 ms |
コンパイル使用メモリ | 12,416 KB |
実行使用メモリ | 27,608 KB |
平均クエリ数 | 374.60 |
最終ジャッジ日時 | 2024-09-25 12:55:58 |
合計ジャッジ時間 | 1,566 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | WA * 1 |
other | WA * 9 |
ソースコード
n = int(input()) ans = [0] * n print(f"? 2 {n}") lst = n * (n + 1) // 2 ans[0] = n * (n + 1) // 2 - int(input()) sm = ans[0] for i in range(n - 2): print(f"? {i+1} {i+2}") ans[i+1] = int(input()) - ans[i] sm += ans[i] ans[n-1] = n * (n + 1) // 2 - sm print("!", *ans)