結果

問題 No.282 おもりと天秤(2)
ユーザー vwxyzvwxyz
提出日時 2023-12-17 22:13:29
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 1,838 ms / 5,000 ms
コード長 516 bytes
コンパイル時間 1,283 ms
コンパイル使用メモリ 11,776 KB
実行使用メモリ 26,248 KB
平均クエリ数 220.83
最終ジャッジ日時 2023-12-17 22:13:49
合計ジャッジ時間 19,655 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 52 ms
26,120 KB
testcase_01 AC 58 ms
26,120 KB
testcase_02 AC 54 ms
26,120 KB
testcase_03 AC 52 ms
26,120 KB
testcase_04 AC 52 ms
26,120 KB
testcase_05 AC 56 ms
26,120 KB
testcase_06 AC 79 ms
26,120 KB
testcase_07 AC 51 ms
26,120 KB
testcase_08 AC 59 ms
26,120 KB
testcase_09 AC 51 ms
26,120 KB
testcase_10 AC 430 ms
26,120 KB
testcase_11 AC 1,617 ms
26,248 KB
testcase_12 AC 440 ms
26,120 KB
testcase_13 AC 745 ms
26,248 KB
testcase_14 AC 1,330 ms
26,248 KB
testcase_15 AC 1,661 ms
26,248 KB
testcase_16 AC 94 ms
26,120 KB
testcase_17 AC 693 ms
26,248 KB
testcase_18 AC 1,160 ms
26,248 KB
testcase_19 AC 1,210 ms
26,248 KB
testcase_20 AC 1,838 ms
26,248 KB
testcase_21 AC 1,776 ms
26,248 KB
testcase_22 AC 1,781 ms
26,248 KB
testcase_23 AC 53 ms
26,120 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
readline=sys.stdin.readline

N=int(readline())
idx=[i for i in range(1,N+1)]
for i in range(N):
    L,R=[],[]
    for j in range(i%2,N,2):
        if j+1<N:
            L.append(idx[j])
            R.append(idx[j+1])
    LR=[]
    for l,r in zip(L,R):
        LR.append(l)
        LR.append(r)
    LR=LR+[0]*(2*N-len(LR))
    print("?",*LR)
    C=input().split()
    for j,c in zip(range(i%2,N,2),C):
        if j+1<N:
            if c==">":
                idx[j],idx[j+1]=idx[j+1],idx[j]
print("!",*idx)
0