結果

問題 No.934 Explosive energy drink
コンテスト
ユーザー 💕💖💞
提出日時 2020-01-07 17:07:27
言語 Python3
(3.14.3 + numpy 2.4.4 + scipy 1.17.1)
コンパイル:
python3 -mpy_compile _filename_
実行:
python3 _filename_
結果
WA  
実行時間 -
コード長 804 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 560 ms
コンパイル使用メモリ 20,952 KB
実行使用メモリ 34,692 KB
平均クエリ数 711.50
最終ジャッジ日時 2026-03-31 08:33:11
合計ジャッジ時間 7,239 ms
ジャッジサーバーID
(参考情報)
judge1_1 / judge2_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 20 WA * 4
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

import os
from itertools import combinations
import random
import copy
n = int(input())
x = list(range(1,n+1))

try:
    def check(x, ch):
        if ch is not None:
            x.remove(ch)
        print(f'? {len(x)}')
        print(' '.join(map(str, x)))

        try:
            result = input()
            if result == '1':
                return True
            else:
                return False
        except:
            return True

    def trier(x):
        for ch in [None] + copy.copy(x):
            '''<E3><83><81><E3><82><A7><E3><83><83><E3><82><AF>'''
            if check(copy.copy(x), ch):
                if ch is not None:
                    x.remove(ch)
        return x

    ans = trier(x)

    print(f'! {len(ans)}')
    print(' '.join(map(str,ans)))
except Exception:
    ...
0