結果

問題 No.282 おもりと天秤(2)
ユーザー kurenaifkurenaif
提出日時 2016-06-14 20:13:35
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 686 bytes
コンパイル時間 706 ms
コンパイル使用メモリ 10,968 KB
実行使用メモリ 24,948 KB
平均クエリ数 440.67
最終ジャッジ日時 2023-09-23 10:54:53
合計ジャッジ時間 35,049 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 42 ms
24,064 KB
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 AC 42 ms
24,200 KB
権限があれば一括ダウンロードができます

ソースコード

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