結果

問題 No.2124 Guess the Permutation
ユーザー ニックネームニックネーム
提出日時 2022-11-18 21:30:43
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 92 ms / 2,000 ms
コード長 196 bytes
コンパイル時間 341 ms
コンパイル使用メモリ 11,676 KB
実行使用メモリ 26,516 KB
平均クエリ数 374.60
最終ジャッジ日時 2023-10-20 06:17:39
合計ジャッジ時間 1,673 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 54 ms
26,404 KB
testcase_01 AC 50 ms
26,404 KB
testcase_02 AC 49 ms
26,404 KB
testcase_03 AC 50 ms
26,404 KB
testcase_04 AC 52 ms
26,404 KB
testcase_05 AC 57 ms
26,408 KB
testcase_06 AC 72 ms
26,452 KB
testcase_07 AC 91 ms
26,516 KB
testcase_08 AC 91 ms
26,516 KB
testcase_09 AC 92 ms
26,516 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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