結果

問題 No.282 おもりと天秤(2)
ユーザー kimiyuki
提出日時 2016-06-14 18:28:30
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
TLE  
(最新)
AC  
(最初)
実行時間 -
コード長 402 bytes
コンパイル時間 595 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 42,660 KB
最終ジャッジ日時 2024-07-16 23:57:00
合計ジャッジ時間 13,082 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other TLE * 1 -- * 23
権限があれば一括ダウンロードができます

ソースコード

diff #

#!/usr/bin/env python3
import sys
QUERY_LIMIT = 2000
n = int(input())
a = list(range(1,n+1))
for i in range(QUERY_LIMIT):
    q = []
    j = i % 2
    while j+1 < n:
        q.append(a[j])
        q.append(a[j+1])
        j += 2
    print('?', *q)
    q = input().split()
    j = i % 2
    while j+1 < n:
        if q[j//2] == '>':
            a[j], a[j+1] = a[j+1], a[j]
        j += 2
print('!', *a)
0