結果
| 問題 |
No.2124 Guess the Permutation
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-11-28 18:06:00 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 353 bytes |
| コンパイル時間 | 93 ms |
| コンパイル使用メモリ | 12,416 KB |
| 実行使用メモリ | 27,608 KB |
| 平均クエリ数 | 373.80 |
| 最終ジャッジ日時 | 2024-10-05 17:34:44 |
| 合計ジャッジ時間 | 1,535 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 1 WA * 8 |
ソースコード
N = int(input())
sm = sum(range(N + 1))
print('?', 2, N)
start = sm - int(input())
print('?', 1, N - 1)
end = sm - int(input())
middle = []
prev = start
l = 1
for r in range(2, N - 2):
print('?', l, r)
S = int(input())
middle.append(S - prev)
prev = S
middle.append(sm - (start + sum(middle) + end))
print('!', start, *middle, end)