結果
| 問題 |
No.2124 Guess the Permutation
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-11-29 13:17:51 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 130 ms / 2,000 ms |
| コード長 | 318 bytes |
| コンパイル時間 | 181 ms |
| コンパイル使用メモリ | 82,284 KB |
| 実行使用メモリ | 86,232 KB |
| 平均クエリ数 | 374.60 |
| 最終ジャッジ日時 | 2024-10-07 00:11:16 |
| 合計ジャッジ時間 | 2,113 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 9 |
ソースコード
N = int(input())
now = N * (N + 1) / 2
ans = []
for i in range(N - 1,1,-1):
l = 1
r = i
print("?",l,r)
S = int(input())
t = now - S
ans.append(int(t))
now -= t
print("?",2,N)
S = int(input())
one = N * (N + 1) // 2 - S
ans.append(int(now - one))
ans.append(one)
print("!",*reversed(ans))