結果

問題 No.2124 Guess the Permutation
ユーザー aaaaaaaaaa2230aaaaaaaaaa2230
提出日時 2022-11-18 21:51:14
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 141 ms / 2,000 ms
コード長 310 bytes
コンパイル時間 756 ms
コンパイル使用メモリ 81,700 KB
実行使用メモリ 86,704 KB
平均クエリ数 374.60
最終ジャッジ日時 2023-10-20 06:40:40
合計ジャッジ時間 2,877 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 67 ms
69,836 KB
testcase_01 AC 62 ms
69,836 KB
testcase_02 AC 62 ms
69,836 KB
testcase_03 AC 64 ms
69,836 KB
testcase_04 AC 66 ms
69,836 KB
testcase_05 AC 68 ms
69,836 KB
testcase_06 AC 108 ms
82,588 KB
testcase_07 AC 141 ms
86,704 KB
testcase_08 AC 138 ms
86,704 KB
testcase_09 AC 137 ms
86,704 KB
権限があれば一括ダウンロードができます

ソースコード

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