結果
問題 | No.2124 Guess the Permutation |
ユーザー | 👑 H20 |
提出日時 | 2022-11-18 21:30:56 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 131 ms / 2,000 ms |
コード長 | 217 bytes |
コンパイル時間 | 265 ms |
コンパイル使用メモリ | 81,660 KB |
実行使用メモリ | 86,768 KB |
平均クエリ数 | 374.60 |
最終ジャッジ日時 | 2023-10-20 06:17:52 |
合計ジャッジ時間 | 1,989 ms |
ジャッジサーバーID (参考情報) |
judge14 / judge15 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 62 ms
69,684 KB |
testcase_01 | AC | 60 ms
69,684 KB |
testcase_02 | AC | 58 ms
69,684 KB |
testcase_03 | AC | 61 ms
69,684 KB |
testcase_04 | AC | 68 ms
69,684 KB |
testcase_05 | AC | 67 ms
69,684 KB |
testcase_06 | AC | 104 ms
82,648 KB |
testcase_07 | AC | 129 ms
86,768 KB |
testcase_08 | AC | 130 ms
86,768 KB |
testcase_09 | AC | 131 ms
86,768 KB |
ソースコード
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)