結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 RE -
testcase_01 AC 254 ms
25,260 KB
testcase_02 AC 41 ms
25,332 KB
testcase_03 AC 143 ms
25,244 KB
testcase_04 AC 422 ms
25,208 KB
testcase_05 AC 41 ms
24,708 KB
testcase_06 RE -
testcase_07 RE -
testcase_08 RE -
testcase_09 AC 40 ms
24,920 KB
testcase_10 AC 43 ms
24,944 KB
testcase_11 AC 41 ms
24,896 KB
testcase_12 AC 44 ms
24,888 KB
testcase_13 AC 48 ms
25,144 KB
testcase_14 AC 50 ms
24,796 KB
testcase_15 AC 145 ms
24,884 KB
testcase_16 AC 55 ms
24,844 KB
testcase_17 AC 75 ms
25,356 KB
testcase_18 AC 82 ms
25,128 KB
testcase_19 AC 118 ms
25,400 KB
testcase_20 AC 182 ms
24,848 KB
testcase_21 AC 184 ms
25,296 KB
testcase_22 AC 250 ms
25,008 KB
testcase_23 AC 252 ms
25,360 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

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

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

buff = set()
def trier(x):
    for ch in [None] + copy.copy(x):
        if ch not in buff:
            '''<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)
                buff.add(ch)
            else:
                buff.add(ch)
    return x

ans = trier(x)

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