結果
問題 |
No.2124 Guess the Permutation
|
ユーザー |
![]() |
提出日時 | 2022-11-18 21:29:19 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 116 ms / 2,000 ms |
コード長 | 535 bytes |
コンパイル時間 | 144 ms |
コンパイル使用メモリ | 82,588 KB |
実行使用メモリ | 83,044 KB |
平均クエリ数 | 374.60 |
最終ジャッジ日時 | 2024-09-20 01:54:25 |
合計ジャッジ時間 | 1,804 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 9 |
ソースコード
mod = 998244353 def main(): import sys input = sys.stdin.readline N = int(input()) x = N * (N + 1) // 2 P = [] for r in range(N - 1, 1, -1): print("?", 1, r) sys.stdout.flush() y = int(input()) P.append(x - y) x = y print("?", 2, 3) sys.stdout.flush() y = int(input()) P.append(y - P[-1]) P.append((N + 1) * N // 2 - sum(P)) P.append("!") P.reverse() print(*P) sys.stdout.flush() exit() if __name__ == '__main__': main()