結果
| 問題 |
No.2124 Guess the Permutation
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2023-10-27 08:23:57 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 275 bytes |
| コンパイル時間 | 96 ms |
| コンパイル使用メモリ | 12,416 KB |
| 実行使用メモリ | 27,592 KB |
| 平均クエリ数 | 373.60 |
| 最終ジャッジ日時 | 2024-09-25 12:55:53 |
| 合計ジャッジ時間 | 1,730 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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(1, n - 2):
print(f"? {i+1} {i+2}")
ans[i] = int(input()) - ans[i-1]
sm += ans[i]
ans[n-1] = n * (n + 1) // 2 - sm
print("!", *ans)