結果

問題 No.934 Explosive energy drink
ユーザー FromBooskaFromBooska
提出日時 2023-08-10 10:27:37
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 497 ms / 2,000 ms
コード長 544 bytes
コンパイル時間 171 ms
コンパイル使用メモリ 82,048 KB
実行使用メモリ 93,912 KB
平均クエリ数 709.58
最終ジャッジ日時 2024-04-28 03:52:21
合計ジャッジ時間 7,708 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 64 ms
68,960 KB
testcase_01 AC 497 ms
93,528 KB
testcase_02 AC 60 ms
68,696 KB
testcase_03 AC 279 ms
93,000 KB
testcase_04 AC 495 ms
93,884 KB
testcase_05 AC 64 ms
69,208 KB
testcase_06 AC 60 ms
68,312 KB
testcase_07 AC 61 ms
68,816 KB
testcase_08 AC 59 ms
68,696 KB
testcase_09 AC 60 ms
68,312 KB
testcase_10 AC 61 ms
68,696 KB
testcase_11 AC 65 ms
69,464 KB
testcase_12 AC 78 ms
79,832 KB
testcase_13 AC 81 ms
81,240 KB
testcase_14 AC 85 ms
82,392 KB
testcase_15 AC 195 ms
92,760 KB
testcase_16 AC 103 ms
89,944 KB
testcase_17 AC 142 ms
92,248 KB
testcase_18 AC 136 ms
92,680 KB
testcase_19 AC 228 ms
93,016 KB
testcase_20 AC 343 ms
92,632 KB
testcase_21 AC 361 ms
93,400 KB
testcase_22 AC 481 ms
93,912 KB
testcase_23 AC 494 ms
93,400 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

# インタラクティブ
# K種類の魔剤、1つでも入っていないと爆発しない
# ある番号を抜かして試す、それでも爆発するならその番号はいらないということ

N = int(input())
no_need = set()
for i in range(1, N+1):
    print('?', N-1)
    l = [a for a in range(1, N+1) if a != i]
    print(*l)
    ans = int(input())
    if ans == 1:
        no_need.add(i)
needed = []
for i in range(1, N+1):
    if i not in no_need:
        needed.append(i)
needed.sort()
print('!', len(needed))
print(*needed)
0