結果

問題 No.2124 Guess the Permutation
ユーザー aaaaaaaaaa2230
提出日時 2022-11-18 21:51:14
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 126 ms / 2,000 ms
コード長 310 bytes
コンパイル時間 150 ms
コンパイル使用メモリ 82,688 KB
実行使用メモリ 87,052 KB
平均クエリ数 374.60
最終ジャッジ日時 2024-09-20 02:14:32
合計ジャッジ時間 1,848 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 9
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
s = n*(n+1)//2
ans = []
now = 0
for i in range(n-1):
    if i == 0:
        print("?",2,n)
        l = int(input())
        ans.append(s-l)
        now = s-l
    else:
        print("?",1,i+1)
        l = int(input())
        ans.append(l-now)
        now = l
ans.append(s-now)
print("!",*ans)
0