結果
問題 |
No.2124 Guess the Permutation
|
ユーザー |
|
提出日時 | 2024-08-11 15:38:40 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 140 ms / 2,000 ms |
コード長 | 284 bytes |
コンパイル時間 | 362 ms |
コンパイル使用メモリ | 82,444 KB |
実行使用メモリ | 86,616 KB |
平均クエリ数 | 374.60 |
最終ジャッジ日時 | 2024-08-11 15:38:43 |
合計ジャッジ時間 | 2,336 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 9 |
ソースコード
N = int(input()) p = [0] * N S = N * (N + 1) // 2 for i in range(1, N - 1): print('?', i + 1, N, flush = True) C = int(input()) p[i - 1] = S - C S = C print('?', 1, N - 1, flush = True) p[N - 1] = N * (N + 1) // 2 - int(input()) p[N - 2] = N * (N + 1) // 2 - sum(p) print('!', *p)