結果

問題 No.934 Explosive energy drink
ユーザー 💕💖💞💕💖💞
提出日時 2020-01-07 17:07:27
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 804 bytes
コンパイル時間 80 ms
コンパイル使用メモリ 10,868 KB
実行使用メモリ 25,376 KB
平均クエリ数 711.50
最終ジャッジ日時 2023-09-23 19:25:02
合計ジャッジ時間 5,486 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 243 ms
25,364 KB
testcase_02 AC 46 ms
24,724 KB
testcase_03 AC 148 ms
25,124 KB
testcase_04 AC 413 ms
25,276 KB
testcase_05 AC 40 ms
25,104 KB
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 AC 41 ms
25,376 KB
testcase_10 AC 41 ms
25,124 KB
testcase_11 AC 39 ms
24,700 KB
testcase_12 AC 42 ms
25,040 KB
testcase_13 AC 45 ms
25,228 KB
testcase_14 AC 49 ms
25,320 KB
testcase_15 AC 144 ms
25,136 KB
testcase_16 AC 54 ms
24,896 KB
testcase_17 AC 72 ms
24,836 KB
testcase_18 AC 78 ms
25,076 KB
testcase_19 AC 117 ms
25,196 KB
testcase_20 AC 175 ms
24,840 KB
testcase_21 AC 190 ms
25,056 KB
testcase_22 AC 249 ms
25,080 KB
testcase_23 AC 252 ms
25,020 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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