結果

問題 No.934 Explosive energy drink
コンテスト
ユーザー kamome
提出日時 2020-05-20 21:43:36
言語 Python3
(3.14.3 + numpy 2.4.4 + scipy 1.17.1)
コンパイル:
python3 -mpy_compile _filename_
実行:
python3 _filename_
結果
AC  
実行時間 281 ms / 2,000 ms
コード長 514 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 528 ms
コンパイル使用メモリ 20,828 KB
実行使用メモリ 34,820 KB
平均クエリ数 711.58
最終ジャッジ日時 2026-03-31 17:14:53
合計ジャッジ時間 5,681 ms
ジャッジサーバーID
(参考情報)
judge1_0 / judge3_1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 24
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

N=int(input())
L=[ str(x) for x in range(1,N+1)]
expl=[]
print("? "+str(N),flush=True)
print(" ".join(L),flush=True)
ans=True if input()=="1" else False
if ans!=True:
    print("! 0",flush=True)
    print("",flush=True)
    exit()

for i in range(N):
    print("? "+str(N-1),flush=True)
    print(" ".join(L[0:i]+L[i+1:]),flush=True)
    ans_str=input()
    ans=True if ans_str=="1" else False
    if ans!=True:
        expl.append(str(i+1))

print("! "+str(len(expl)),flush=True)
print(" ".join(expl),flush=True)
0