結果

問題 No.934 Explosive energy drink
コンテスト
ユーザー wasd314
提出日時 2026-08-17 07:26:59
言語 PyPy3
(7.3.17)
コンパイル:
pypy3 -mpy_compile _filename_
実行:
pypy3 _filename_
結果
AC  
実行時間 329 ms / 2,000 ms
+ 2µs
コード長 338 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 214 ms
コンパイル使用メモリ 96,056 KB
実行使用メモリ 84,992 KB
平均クエリ数 709.08
最終ジャッジ日時 2026-08-17 07:27:06
合計ジャッジ時間 4,562 ms
ジャッジサーバーID
(参考情報)
judge1_0 / judge3_1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 24
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

n = int(input())


def p_print(*arg):
    print(*arg, flush=True)


def ask(a):
    if len(a) <= 1:
        return 0
    p_print("?", len(a))
    p_print(*sorted(a))
    return int(input())


s = set(range(1, n + 1))
for i in range(1, n + 1):
    s.remove(i)
    if not ask(s):
        s.add(i)


p_print("!", len(s))
p_print(*sorted(s))
0