結果

問題 No.282 おもりと天秤(2)
ユーザー vwxyzvwxyz
提出日時 2023-12-17 22:13:12
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 3,647 ms / 5,000 ms
コード長 518 bytes
コンパイル時間 196 ms
コンパイル使用メモリ 11,904 KB
実行使用メモリ 26,376 KB
平均クエリ数 440.67
最終ジャッジ日時 2023-12-17 22:13:46
合計ジャッジ時間 33,878 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 60 ms
26,120 KB
testcase_01 AC 71 ms
26,120 KB
testcase_02 AC 60 ms
26,120 KB
testcase_03 AC 57 ms
26,120 KB
testcase_04 AC 56 ms
26,120 KB
testcase_05 AC 63 ms
26,120 KB
testcase_06 AC 67 ms
26,120 KB
testcase_07 AC 54 ms
26,120 KB
testcase_08 AC 69 ms
26,120 KB
testcase_09 AC 52 ms
26,120 KB
testcase_10 AC 955 ms
26,248 KB
testcase_11 AC 3,424 ms
26,376 KB
testcase_12 AC 1,005 ms
26,248 KB
testcase_13 AC 1,555 ms
26,248 KB
testcase_14 AC 2,705 ms
26,248 KB
testcase_15 AC 3,492 ms
26,376 KB
testcase_16 AC 143 ms
26,120 KB
testcase_17 AC 1,442 ms
26,248 KB
testcase_18 AC 2,329 ms
26,376 KB
testcase_19 AC 2,439 ms
26,376 KB
testcase_20 AC 3,647 ms
26,376 KB
testcase_21 AC 3,580 ms
26,376 KB
testcase_22 AC 3,628 ms
26,376 KB
testcase_23 AC 52 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(2*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