結果

問題 No.1959 Prefix MinMax
ユーザー siganaisiganai
提出日時 2022-05-28 00:06:11
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 138 ms / 2,000 ms
コード長 849 bytes
コンパイル時間 175 ms
コンパイル使用メモリ 81,844 KB
実行使用メモリ 93,988 KB
平均クエリ数 26.72
最終ジャッジ日時 2023-10-20 21:33:58
合計ジャッジ時間 6,221 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 81 ms
80,000 KB
testcase_01 AC 76 ms
80,000 KB
testcase_02 AC 79 ms
80,000 KB
testcase_03 AC 81 ms
80,000 KB
testcase_04 AC 78 ms
80,000 KB
testcase_05 AC 81 ms
80,000 KB
testcase_06 AC 79 ms
80,000 KB
testcase_07 AC 129 ms
93,916 KB
testcase_08 AC 127 ms
93,900 KB
testcase_09 AC 130 ms
93,896 KB
testcase_10 AC 127 ms
93,892 KB
testcase_11 AC 125 ms
93,892 KB
testcase_12 AC 122 ms
93,900 KB
testcase_13 AC 131 ms
93,988 KB
testcase_14 AC 128 ms
93,952 KB
testcase_15 AC 123 ms
93,948 KB
testcase_16 AC 122 ms
93,896 KB
testcase_17 AC 121 ms
93,896 KB
testcase_18 AC 124 ms
93,888 KB
testcase_19 AC 124 ms
93,900 KB
testcase_20 AC 138 ms
93,976 KB
testcase_21 AC 126 ms
93,892 KB
testcase_22 AC 124 ms
93,880 KB
testcase_23 AC 121 ms
93,880 KB
testcase_24 AC 123 ms
93,920 KB
testcase_25 AC 124 ms
93,880 KB
testcase_26 AC 125 ms
93,900 KB
testcase_27 AC 124 ms
93,876 KB
testcase_28 AC 119 ms
93,876 KB
testcase_29 AC 118 ms
93,868 KB
testcase_30 AC 130 ms
93,892 KB
testcase_31 AC 124 ms
93,896 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#!/usr/bin/env PyPy3

from collections import Counter, defaultdict, deque
import itertools
import re
import math
from functools import reduce
import operator
import bisect
from heapq import *
import functools
mod=998244353

import sys
input=sys.stdin.readline
t = int(input())
for _ in range(t):
    n = int(input())
    binn = n.bit_length()
    que = [[0] * (n - 1) for _ in range(2)]
    for i in range(n - 1):
        for j in range(2):
            if (i + j) % 2:
                que[j][i] = 1
    res = []
    for i in range(2):
        print('?',*que[i],flush=True)
        tmp = list(map(int,input().split()))
        res.append(tmp)
    ans = [res[0][0]]
    for j in range(1,n):
        for i in range(2):
            if res[i][j] != res[i][j-1]:
                ans.append(res[i][j])
                break
    print('!',*ans,flush = True)
0