結果

問題 No.2124 Guess the Permutation
ユーザー hir355hir355
提出日時 2022-11-18 21:46:55
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 132 ms / 2,000 ms
コード長 287 bytes
コンパイル時間 193 ms
コンパイル使用メモリ 81,708 KB
実行使用メモリ 86,564 KB
平均クエリ数 374.60
最終ジャッジ日時 2023-10-20 06:33:48
合計ジャッジ時間 1,998 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 64 ms
69,676 KB
testcase_01 AC 60 ms
69,676 KB
testcase_02 AC 60 ms
69,676 KB
testcase_03 AC 61 ms
69,676 KB
testcase_04 AC 69 ms
69,676 KB
testcase_05 AC 66 ms
69,676 KB
testcase_06 AC 103 ms
82,452 KB
testcase_07 AC 132 ms
86,564 KB
testcase_08 AC 130 ms
86,564 KB
testcase_09 AC 130 ms
86,564 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
s = 0
a = [0] * n
b = [0] * n
b[n - 1] = n * (n + 1) // 2
for i in range(n - 2):
    print('?', 1, i + 2)
    b[i + 1] = int(input())
print('?', 2, n)
b[0] = n * (n + 1) // 2 - int(input())
a[0] = b[0]
for i in range(n - 1):
    a[i + 1] = b[i + 1] - b[i]
print('!', *a)
0