結果
問題 |
No.2124 Guess the Permutation
|
ユーザー |
![]() |
提出日時 | 2022-11-18 21:46:55 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 126 ms / 2,000 ms |
コード長 | 287 bytes |
コンパイル時間 | 132 ms |
コンパイル使用メモリ | 82,088 KB |
実行使用メモリ | 87,004 KB |
平均クエリ数 | 374.60 |
最終ジャッジ日時 | 2024-09-20 02:09:53 |
合計ジャッジ時間 | 1,742 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 9 |
ソースコード
n = int(input()) s = 0 a = [0] * n b = [0] * n b[n - 1] = n * (n + 1) // 2 for i in range(n - 2): print('?', 1, i + 2) b[i + 1] = int(input()) print('?', 2, n) b[0] = n * (n + 1) // 2 - int(input()) a[0] = b[0] for i in range(n - 1): a[i + 1] = b[i + 1] - b[i] print('!', *a)