結果
| 問題 | No.2124 Guess the Permutation |
| コンテスト | |
| ユーザー |
lllllll88938494
|
| 提出日時 | 2023-05-16 18:45:05 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 386 bytes |
| 記録 | |
| コンパイル時間 | 510 ms |
| コンパイル使用メモリ | 81,844 KB |
| 実行使用メモリ | 85,636 KB |
| 平均クエリ数 | 374.60 |
| 最終ジャッジ日時 | 2024-12-14 17:17:47 |
| 合計ジャッジ時間 | 2,434 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 1 |
| other | WA * 9 |
ソースコード
n=int(input())
ans = [0]*n
print(f'? {1} {2}',flush=True)
t = int(input())
print(f'? {2} {3}',flush=True)
t2 = int(input())
for i in range(1,n+1):
if t - i == t2 - i:
ans[1] = i
break
ans[0]=t-ans[1]
ans[2]=t2-ans[1]
ind = 3
while n > ind:
print(f'? {ind-1} {ind}')
t=int(input())
ans[ind] = t - ans[ind-1]
ind += 1
print('!',*ans)
lllllll88938494