結果

問題 No.282 おもりと天秤(2)
ユーザー kurenaif
提出日時 2016-06-14 20:13:35
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
実行時間 -
コード長 686 bytes
コンパイル時間 228 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 28,360 KB
平均クエリ数 440.67
最終ジャッジ日時 2024-07-16 10:27:30
合計ジャッジ時間 39,413 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 2 WA * 22
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
import math


def Q(nums):
    out = "? "
    for num in nums:
        out += str(num) + " "

    print(out[:len(out)-1])
    sys.stdout.flush()

def A(nums):
    out = "! "
    for num in nums:
        out += str(num) + " "

    print(out[:len(out)-1])
    sys.stdout.flush()

n = int(input())
n*=2
array = [0]*n
for i in range(int(n/2)):
    array[i] = i+1

for count in range(n):
    off = ((count%2))
    Q([0] + array[off:] if off == 1 else array)
    res = list(map(str, input().split()))
    for j in range(math.ceil(n/2.0)):
        if res[j] == ">" and array[2*j+1+off] != 0:
            array[2*j+off], array[2*j+1+off] = array[2*j+1+off], array[2*j+off]

A(array)
0