結果

問題 No.934 Explosive energy drink
ユーザー mkawa2mkawa2
提出日時 2019-11-30 00:57:06
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
RE  
実行時間 -
コード長 771 bytes
コンパイル時間 332 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 27,520 KB
平均クエリ数 649.00
最終ジャッジ日時 2024-07-16 18:55:37
合計ジャッジ時間 6,408 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 54 ms
27,336 KB
testcase_01 AC 324 ms
27,480 KB
testcase_02 AC 51 ms
27,224 KB
testcase_03 AC 114 ms
27,480 KB
testcase_04 AC 802 ms
27,352 KB
testcase_05 RE -
testcase_06 AC 54 ms
27,224 KB
testcase_07 AC 49 ms
27,096 KB
testcase_08 AC 50 ms
27,352 KB
testcase_09 AC 50 ms
27,096 KB
testcase_10 AC 52 ms
27,352 KB
testcase_11 AC 49 ms
27,248 KB
testcase_12 AC 52 ms
26,968 KB
testcase_13 AC 57 ms
27,224 KB
testcase_14 AC 62 ms
27,224 KB
testcase_15 AC 250 ms
27,096 KB
testcase_16 AC 65 ms
26,968 KB
testcase_17 AC 77 ms
27,224 KB
testcase_18 AC 113 ms
27,480 KB
testcase_19 AC 168 ms
27,096 KB
testcase_20 AC 308 ms
27,480 KB
testcase_21 AC 281 ms
27,352 KB
testcase_22 AC 429 ms
27,352 KB
testcase_23 AC 464 ms
27,520 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from collections import deque
import sys

sys.setrecursionlimit(10 ** 6)
int1 = lambda x: int(x) - 1
p2D = lambda x: print(*x, sep="\n")
def MI(): return map(int, sys.stdin.readline().split())
def LI(): return list(map(int, sys.stdin.readline().split()))
def LLI(rows_number): return [LI() for _ in range(rows_number)]

n=int(input())
hit=deque()

def q(x):
    lst=list(range(1,x+1))
    print("?",len(lst)+len(hit))
    print(*lst,*hit)

def main():
    l=0
    r=n+1
    while l + 1 < r:
        m = (l + r) // 2
        q(m)
        if input() == "0":
            l = m
        else:
            r = m
    hit.append(r)
    for x in range(r-1,0,-1):
        q(x-1)
        if input()=="0":
            hit.appendleft(x)
    print("!",len(hit))
    print(*hit)

main()
0