結果

問題 No.2124 Guess the Permutation
コンテスト
ユーザー pitP
提出日時 2022-11-18 21:26:39
言語 PyPy3
(7.3.23 + ACL)
コンパイル:
pypy3 -mpy_compile _filename_
実行:
pypy3 _filename_
結果
AC  
実行時間 198 ms / 2,000 ms
+ 2µs
コード長 244 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 223 ms
コンパイル使用メモリ 95,564 KB
実行使用メモリ 83,852 KB
平均クエリ数 374.60
最終ジャッジ日時 2026-08-31 12:08:05
合計ジャッジ時間 2,158 ms
ジャッジサーバーID
(参考情報)
judge3_0 / judge2_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 9
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

N = int(input())
wa = N * (N+1) // 2
c = [0] * (N+1)
c[N] = wa
for r in range(2,N):
    print("?",1,r)
    c[r] = int(input())
print("?",2,N)
s = int(input())
c[1] = wa - s
ans = []
for i in range(N):
    ans.append(c[i+1]-c[i])
print("!",*ans)
0