結果

問題 No.934 Explosive energy drink
ユーザー komkompikomkompi
提出日時 2020-04-28 08:17:07
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 590 ms / 2,000 ms
コード長 383 bytes
コンパイル時間 206 ms
コンパイル使用メモリ 10,844 KB
実行使用メモリ 24,636 KB
平均クエリ数 709.42
最終ジャッジ日時 2023-09-24 03:24:14
合計ジャッジ時間 5,185 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 41 ms
23,532 KB
testcase_01 AC 332 ms
24,636 KB
testcase_02 AC 33 ms
23,464 KB
testcase_03 AC 168 ms
24,204 KB
testcase_04 AC 590 ms
24,420 KB
testcase_05 AC 36 ms
23,848 KB
testcase_06 AC 34 ms
23,832 KB
testcase_07 AC 34 ms
23,820 KB
testcase_08 AC 31 ms
24,060 KB
testcase_09 AC 31 ms
23,628 KB
testcase_10 AC 31 ms
23,388 KB
testcase_11 AC 31 ms
23,684 KB
testcase_12 AC 33 ms
23,664 KB
testcase_13 AC 38 ms
23,684 KB
testcase_14 AC 39 ms
23,652 KB
testcase_15 AC 180 ms
23,964 KB
testcase_16 AC 49 ms
23,624 KB
testcase_17 AC 77 ms
23,604 KB
testcase_18 AC 87 ms
24,348 KB
testcase_19 AC 132 ms
23,676 KB
testcase_20 AC 230 ms
23,972 KB
testcase_21 AC 228 ms
24,204 KB
testcase_22 AC 324 ms
24,600 KB
testcase_23 AC 326 ms
24,456 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N=int(input())
A=[i+1 for i in range(N)]


ans=[]
for M in range(N)[::-1]:
    if len(A[:M]+ans)<=1:
        print("!", str(len(pre)))
        print(*pre)
        exit()
    
    print("?", str(len(A[:M]+ans)))
    print(*A[:M]+ans)
    
    pre=A[:M]+ans
    
    judge=int(input())
    
    if judge==0:
        ans=[A[-1]]+ans
    A.pop(-1)

print("!", str(len(ans)))
print(*ans)
0