結果
| 問題 |
No.934 Explosive energy drink
|
| コンテスト | |
| ユーザー |
💕💖💞
|
| 提出日時 | 2020-01-07 16:52:40 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 807 bytes |
| コンパイル時間 | 182 ms |
| コンパイル使用メモリ | 12,672 KB |
| 実行使用メモリ | 28,376 KB |
| 平均クエリ数 | 711.08 |
| 最終ジャッジ日時 | 2024-07-16 19:13:26 |
| 合計ジャッジ時間 | 6,597 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 20 RE * 4 |
ソースコード
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):
if len(buff) == n:
return None
for ch in copy.copy(x):
if ch not in buff:
'''チェック'''
if check(copy.copy(x), ch):
x.remove(ch)
buff.add(ch)
else:
buff.add(ch)
ans = None
if check(x, None):
ans = x
while True:
ret = trier(x)
if ret is None:
ans = x
break
print(f'! {len(ans)}')
print(' '.join(map(str,ans)))
💕💖💞