結果

問題 No.2124 Guess the Permutation
ユーザー pitPpitP
提出日時 2022-11-18 21:26:39
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 130 ms / 2,000 ms
コード長 244 bytes
コンパイル時間 1,329 ms
コンパイル使用メモリ 81,604 KB
実行使用メモリ 86,696 KB
平均クエリ数 374.60
最終ジャッジ日時 2023-10-20 06:13:56
合計ジャッジ時間 1,928 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 69 ms
69,792 KB
testcase_01 AC 58 ms
69,792 KB
testcase_02 AC 58 ms
69,792 KB
testcase_03 AC 59 ms
69,792 KB
testcase_04 AC 62 ms
69,792 KB
testcase_05 AC 65 ms
69,792 KB
testcase_06 AC 103 ms
82,584 KB
testcase_07 AC 129 ms
86,696 KB
testcase_08 AC 130 ms
86,696 KB
testcase_09 AC 129 ms
86,696 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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