結果

問題 No.934 Explosive energy drink
ユーザー mkawa2mkawa2
提出日時 2021-03-30 12:58:52
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 644 ms / 2,000 ms
コード長 348 bytes
コンパイル時間 74 ms
コンパイル使用メモリ 10,672 KB
実行使用メモリ 24,384 KB
平均クエリ数 709.08
最終ジャッジ日時 2023-09-24 10:18:31
合計ジャッジ時間 5,851 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 42 ms
23,432 KB
testcase_01 AC 371 ms
24,144 KB
testcase_02 AC 35 ms
24,252 KB
testcase_03 AC 202 ms
24,192 KB
testcase_04 AC 644 ms
24,184 KB
testcase_05 AC 37 ms
23,844 KB
testcase_06 AC 34 ms
24,012 KB
testcase_07 AC 36 ms
24,384 KB
testcase_08 AC 36 ms
24,384 KB
testcase_09 AC 37 ms
23,784 KB
testcase_10 AC 35 ms
23,600 KB
testcase_11 AC 38 ms
24,336 KB
testcase_12 AC 39 ms
24,384 KB
testcase_13 AC 45 ms
23,736 KB
testcase_14 AC 48 ms
23,560 KB
testcase_15 AC 203 ms
23,904 KB
testcase_16 AC 59 ms
23,652 KB
testcase_17 AC 88 ms
24,012 KB
testcase_18 AC 96 ms
24,204 KB
testcase_19 AC 163 ms
23,588 KB
testcase_20 AC 268 ms
23,652 KB
testcase_21 AC 266 ms
23,560 KB
testcase_22 AC 379 ms
24,340 KB
testcase_23 AC 383 ms
24,024 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def ask(aa):
    if len(aa)==1:return 0
    if len(aa)==n:return 1
    print("?", len(aa), flush=True)
    print(*aa, flush=True)
    return int(input())

n = int(input())
ans=[]
for i in range(1,n):
    if ask(ans+list(range(i+1,n+1)))==0:
        ans.append(i)

if ask(ans)==0:ans.append(n)

print("!",len(ans),flush=True)
print(*ans,flush=True)
0