結果
問題 | No.1959 Prefix MinMax |
ユーザー | lilictaka |
提出日時 | 2022-06-02 01:02:53 |
言語 | PyPy3 (7.3.15) |
結果 |
RE
|
実行時間 | - |
コード長 | 591 bytes |
コンパイル時間 | 1,293 ms |
コンパイル使用メモリ | 81,708 KB |
実行使用メモリ | 93,924 KB |
平均クエリ数 | 16.62 |
最終ジャッジ日時 | 2023-10-21 01:04:03 |
合計ジャッジ時間 | 8,713 ms |
ジャッジサーバーID (参考情報) |
judge13 / judge11 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 61 ms
69,688 KB |
testcase_01 | AC | 59 ms
69,688 KB |
testcase_02 | AC | 54 ms
69,688 KB |
testcase_03 | AC | 55 ms
69,688 KB |
testcase_04 | AC | 57 ms
69,688 KB |
testcase_05 | AC | 58 ms
69,688 KB |
testcase_06 | AC | 58 ms
69,688 KB |
testcase_07 | RE | - |
testcase_08 | RE | - |
testcase_09 | RE | - |
testcase_10 | RE | - |
testcase_11 | RE | - |
testcase_12 | RE | - |
testcase_13 | RE | - |
testcase_14 | RE | - |
testcase_15 | RE | - |
testcase_16 | RE | - |
testcase_17 | RE | - |
testcase_18 | RE | - |
testcase_19 | RE | - |
testcase_20 | RE | - |
testcase_21 | RE | - |
testcase_22 | RE | - |
testcase_23 | RE | - |
testcase_24 | RE | - |
testcase_25 | RE | - |
testcase_26 | RE | - |
testcase_27 | RE | - |
testcase_28 | RE | - |
testcase_29 | RE | - |
testcase_30 | RE | - |
testcase_31 | RE | - |
ソースコード
T = int(input()) for _ in range(T): N = int(input()) ans = [0] * N board = [0] * N seen = [False] * N while not all(ans): print('?' ,*board[1:]) rev = list(map(int,input().split())) memo = set() last = [-1] * (N+1) for i in range(len(rev)): if seen[i]: continue if rev[i] in memo: board[i] = board[last[rev[i]]] ^ 1 continue memo.add(rev[i]) last[rev[i]] = i seen[i] = True ans[i] = rev[i] print('!',*ans)