結果
| 問題 |
No.2124 Guess the Permutation
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-11-28 17:35:25 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 347 bytes |
| コンパイル時間 | 172 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 27,760 KB |
| 平均クエリ数 | 374.60 |
| 最終ジャッジ日時 | 2024-10-05 16:51:43 |
| 合計ジャッジ時間 | 1,786 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 1 |
| other | AC * 6 WA * 3 |
ソースコード
N = int(input())
print('?', 1, 2)
prev = int(input())
ans = []
used = [False] * (N + 1)
l = 1
for r in range(3, N + 1):
print('?', l, r)
S = int(input())
ans.append(S - prev)
used[S - prev] = True
prev = S
first = []
for i in range(1, N + 1):
if not used[i]:
first.append(i)
print('!', *first, *ans)