結果
問題 | No.2124 Guess the Permutation |
ユーザー |
![]() |
提出日時 | 2022-11-24 18:01:45 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 116 ms / 2,000 ms |
コード長 | 290 bytes |
コンパイル時間 | 161 ms |
コンパイル使用メモリ | 82,356 KB |
実行使用メモリ | 83,680 KB |
平均クエリ数 | 374.60 |
最終ジャッジ日時 | 2024-10-01 07:51:05 |
合計ジャッジ時間 | 1,899 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 9 |
ソースコード
import sys input=lambda:sys.stdin.readline().rstrip() N=int(input()) A=[0 for i in range(N)] for i in range(1,N-1): print('?',1,i+1,flush=True) A[i]=int(input()) print('?',2,N,flush=True) A[0]=N*(N+1)//2-int(input()) A[N-1]=N*(N+1)//2 for i in range(N-1,0,-1): A[i]-=A[i-1] print('!',*A)