結果

問題 No.2124 Guess the Permutation
ユーザー titiatitia
提出日時 2022-11-18 21:29:43
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
RE  
実行時間 -
コード長 312 bytes
コンパイル時間 151 ms
コンパイル使用メモリ 11,900 KB
実行使用メモリ 26,600 KB
平均クエリ数 1.00
最終ジャッジ日時 2023-10-20 06:16:59
合計ジャッジ時間 1,579 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 RE -
testcase_01 RE -
testcase_02 RE -
testcase_03 RE -
testcase_04 RE -
testcase_05 RE -
testcase_06 RE -
testcase_07 RE -
testcase_08 RE -
testcase_09 RE -
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = sys.stdin.readline

N=int(input())


SUM=(N+1)*N//2

ANS=[0]*N

NOW=SUM
for i in range(N-2):
    print(i+2,N,flush=True)
    x=int(input())

    ANS[i]=NOW-x
    NOW-=ANS[i]
    
    
print(N-2,N-1,flush=True)
x=int(input())

ANS[-2]=x-ANS[-3]
ANS[-1]=SUM-sum(ANS)

print("!",*ANS,flush=True)
0