結果

問題 No.2124 Guess the Permutation
ユーザー lilictakalilictaka
提出日時 2022-12-02 16:12:04
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 131 ms / 2,000 ms
コード長 282 bytes
コンパイル時間 393 ms
コンパイル使用メモリ 82,176 KB
実行使用メモリ 86,572 KB
平均クエリ数 374.60
最終ジャッジ日時 2024-04-18 00:08:43
合計ジャッジ時間 2,369 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 60 ms
68,320 KB
testcase_01 AC 56 ms
68,592 KB
testcase_02 AC 57 ms
68,952 KB
testcase_03 AC 58 ms
69,336 KB
testcase_04 AC 60 ms
69,664 KB
testcase_05 AC 64 ms
69,592 KB
testcase_06 AC 101 ms
82,180 KB
testcase_07 AC 129 ms
86,572 KB
testcase_08 AC 131 ms
85,464 KB
testcase_09 AC 130 ms
85,592 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
S = (N * (N+1))//2
ANS = ['!']
for l in range(2,N):
    tmp = ['?',l,N]
    print(*tmp)
    s = int(input())
    ANS.append(S-s)
    S-=ANS[-1]
tmp = ['?',1,N-1]
print(*tmp)
s = int(input())
last = ((N * (N+1))//2 -s)
ANS.append(S-last)
ANS.append(last)
print(*ANS)
0