結果
問題 | No.2124 Guess the Permutation |
ユーザー |
![]() |
提出日時 | 2022-11-18 21:30:56 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 134 ms / 2,000 ms |
コード長 | 217 bytes |
コンパイル時間 | 144 ms |
コンパイル使用メモリ | 82,368 KB |
実行使用メモリ | 86,256 KB |
平均クエリ数 | 374.60 |
最終ジャッジ日時 | 2024-09-20 01:55:27 |
合計ジャッジ時間 | 1,807 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 9 |
ソースコード
N = int(input())print('?',2,N,flush=True)ANS = [N*(N+1)//2 - int(input())]for i in range(1,N-1):print('?',i,i+1,flush=True)ANS.append(int(input())-ANS[-1])ANS.append(N*(N+1)//2-sum(ANS))print('!',*ANS)