結果

問題 No.934 Explosive energy drink
ユーザー convexineq
提出日時 2019-11-29 22:07:22
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
RE  
実行時間 -
コード長 688 bytes
コンパイル時間 119 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 27,496 KB
平均クエリ数 709.42
最終ジャッジ日時 2024-07-16 18:24:38
合計ジャッジ時間 6,742 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 23 RE * 1
権限があれば一括ダウンロードができます

ソースコード

diff #

# coding: utf-8
# Your code here!
import sys
sys.setrecursionlimit(10**6)
readline = sys.stdin.readline
 
#h,w,k = [int(i) for i in readline().split()]
#n = int(input())
#ab = [[int(i) for i in readline().split()] for _ in range(n)]


n = int(input())

ans1 = list(range(1,n+1))
ans2 = []

for i in range(n,0,-1):
    if i == 1 and len(ans2) == 1:
        ans2.append(i)
        ans1.pop()
        break
    ans1.pop()
    print("? {}".format(len(ans1) + len(ans2)))
    print(*sorted(ans1 + list(reversed(ans2))))
    sys.stdout.flush()
    if input() == "0":
        ans2.append(i)



print("! {}".format(len(ans1) + len(ans2)))
print(*(ans1 + list(reversed(ans2))))
sys.stdout.flush()
0