結果

問題 No.1959 Prefix MinMax
ユーザー 👑 tute7627tute7627
提出日時 2022-05-14 18:28:33
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 238 ms / 2,000 ms
コード長 587 bytes
コンパイル時間 79 ms
コンパイル使用メモリ 11,796 KB
実行使用メモリ 26,856 KB
平均クエリ数 97.97
最終ジャッジ日時 2023-10-20 20:48:22
合計ジャッジ時間 8,016 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 56 ms
26,548 KB
testcase_01 AC 54 ms
26,552 KB
testcase_02 AC 47 ms
26,548 KB
testcase_03 AC 50 ms
26,548 KB
testcase_04 AC 50 ms
26,548 KB
testcase_05 AC 52 ms
26,552 KB
testcase_06 AC 54 ms
26,552 KB
testcase_07 AC 222 ms
26,824 KB
testcase_08 AC 212 ms
26,808 KB
testcase_09 AC 219 ms
26,808 KB
testcase_10 AC 218 ms
26,812 KB
testcase_11 AC 218 ms
26,816 KB
testcase_12 AC 230 ms
26,804 KB
testcase_13 AC 215 ms
26,828 KB
testcase_14 AC 224 ms
26,808 KB
testcase_15 AC 220 ms
26,808 KB
testcase_16 AC 215 ms
26,824 KB
testcase_17 AC 225 ms
26,832 KB
testcase_18 AC 238 ms
26,824 KB
testcase_19 AC 220 ms
26,828 KB
testcase_20 AC 217 ms
26,808 KB
testcase_21 AC 220 ms
26,832 KB
testcase_22 AC 216 ms
26,824 KB
testcase_23 AC 212 ms
26,804 KB
testcase_24 AC 230 ms
26,820 KB
testcase_25 AC 222 ms
26,804 KB
testcase_26 AC 219 ms
26,840 KB
testcase_27 AC 222 ms
26,824 KB
testcase_28 AC 221 ms
26,824 KB
testcase_29 AC 226 ms
26,852 KB
testcase_30 AC 215 ms
26,856 KB
testcase_31 AC 216 ms
26,848 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

T = int(input())

for _ in range(T):
  N = int(input())
  P = [0] * N
  for q in range(10):
    print("?", end = " ")
    A = [0] * (N - 1)
    for i in range(N - 1):
      if i % 2 == q % 2:
        A[i] = 1
      if i + 1 != N - 1:
        print(A[i], end = " ")
      else:
        print(A[i], flush = True)
    B = list(map(int, input().split()))
    P[0] = B[0]
    for i in range(N - 1):
      if B[i] != B[i + 1]:
        P[i + 1] = B[i + 1]
  print("!", end = " ")
  for i in range(N):
    if i + 1 != N:
      print(P[i], end = " ")
    else:
      print(P[i], flush = True)

  
0