結果

問題 No.934 Explosive energy drink
ユーザー convexineqconvexineq
提出日時 2019-11-29 22:09:54
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 644 ms / 2,000 ms
コード長 775 bytes
コンパイル時間 194 ms
コンパイル使用メモリ 10,856 KB
実行使用メモリ 24,544 KB
平均クエリ数 709.42
最終ジャッジ日時 2023-09-23 18:33:21
合計ジャッジ時間 5,804 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 43 ms
24,276 KB
testcase_01 AC 360 ms
24,200 KB
testcase_02 AC 39 ms
24,108 KB
testcase_03 AC 197 ms
24,544 KB
testcase_04 AC 644 ms
24,408 KB
testcase_05 AC 39 ms
24,024 KB
testcase_06 AC 39 ms
24,048 KB
testcase_07 AC 39 ms
23,688 KB
testcase_08 AC 39 ms
23,604 KB
testcase_09 AC 38 ms
23,592 KB
testcase_10 AC 39 ms
23,604 KB
testcase_11 AC 40 ms
23,400 KB
testcase_12 AC 40 ms
24,036 KB
testcase_13 AC 45 ms
23,808 KB
testcase_14 AC 48 ms
23,468 KB
testcase_15 AC 198 ms
24,276 KB
testcase_16 AC 60 ms
23,376 KB
testcase_17 AC 85 ms
23,592 KB
testcase_18 AC 92 ms
24,348 KB
testcase_19 AC 148 ms
23,532 KB
testcase_20 AC 250 ms
24,400 KB
testcase_21 AC 261 ms
24,080 KB
testcase_22 AC 347 ms
23,768 KB
testcase_23 AC 354 ms
24,380 KB
権限があれば一括ダウンロードができます

ソースコード

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
    if i == 2 and len(ans2) == 0:
        ans2 = [2,1]
        ans1 = []
        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