結果
問題 | No.934 Explosive energy drink |
ユーザー | mkawa2 |
提出日時 | 2019-11-30 00:09:46 |
言語 | Python3 (3.12.2 + numpy 1.26.4 + scipy 1.12.0) |
結果 |
RE
|
実行時間 | - |
コード長 | 998 bytes |
コンパイル時間 | 130 ms |
コンパイル使用メモリ | 10,976 KB |
実行使用メモリ | 24,524 KB |
平均クエリ数 | 453.04 |
最終ジャッジ日時 | 2023-09-23 19:06:10 |
合計ジャッジ時間 | 5,216 ms |
ジャッジサーバーID (参考情報) |
judge14 / judge13 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | RE | - |
testcase_01 | AC | 45 ms
24,116 KB |
testcase_02 | AC | 37 ms
24,044 KB |
testcase_03 | AC | 45 ms
24,004 KB |
testcase_04 | RE | - |
testcase_05 | RE | - |
testcase_06 | RE | - |
testcase_07 | RE | - |
testcase_08 | AC | 42 ms
23,996 KB |
testcase_09 | AC | 38 ms
24,288 KB |
testcase_10 | AC | 39 ms
24,008 KB |
testcase_11 | AC | 39 ms
24,512 KB |
testcase_12 | AC | 43 ms
23,960 KB |
testcase_13 | AC | 60 ms
24,224 KB |
testcase_14 | AC | 89 ms
24,360 KB |
testcase_15 | RE | - |
testcase_16 | AC | 39 ms
23,912 KB |
testcase_17 | AC | 43 ms
23,872 KB |
testcase_18 | AC | 137 ms
24,244 KB |
testcase_19 | AC | 48 ms
23,840 KB |
testcase_20 | AC | 196 ms
24,168 KB |
testcase_21 | AC | 53 ms
24,124 KB |
testcase_22 | AC | 94 ms
24,336 KB |
testcase_23 | AC | 61 ms
23,940 KB |
ソースコード
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=[] def q(x,y): lst=list(range(x,y+1))+hit lst.sort() print("?",len(lst)) print(*lst) def main(): b,e=1,n while e>2: l,r=1,e while l+1<r: m=(l+r)//2 q(b,m) if input()=="0": l=m else: e=r=m if e==2:break hit.append(r) e-=1 hit.sort() print("?",len(hit)) print(*hit) if input()=="0": q(1,1) if input()=="1": hit.append(1) else: hit.append(2) q(3,2) if input()=="0": hit.append(1) hit.sort() print("!",len(hit)) print(*hit) main()