結果

問題 No.934 Explosive energy drink
ユーザー brthyyjpbrthyyjp
提出日時 2022-01-12 13:53:04
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 440 ms / 2,000 ms
コード長 401 bytes
コンパイル時間 338 ms
コンパイル使用メモリ 82,156 KB
実行使用メモリ 93,704 KB
平均クエリ数 709.58
最終ジャッジ日時 2024-04-27 10:32:53
合計ジャッジ時間 6,878 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 53 ms
68,816 KB
testcase_01 AC 427 ms
93,336 KB
testcase_02 AC 52 ms
69,216 KB
testcase_03 AC 247 ms
92,788 KB
testcase_04 AC 440 ms
93,704 KB
testcase_05 AC 56 ms
69,212 KB
testcase_06 AC 54 ms
69,580 KB
testcase_07 AC 51 ms
69,244 KB
testcase_08 AC 58 ms
70,152 KB
testcase_09 AC 58 ms
69,288 KB
testcase_10 AC 59 ms
69,356 KB
testcase_11 AC 59 ms
71,104 KB
testcase_12 AC 72 ms
80,060 KB
testcase_13 AC 71 ms
79,880 KB
testcase_14 AC 75 ms
80,720 KB
testcase_15 AC 186 ms
92,496 KB
testcase_16 AC 92 ms
89,632 KB
testcase_17 AC 131 ms
92,828 KB
testcase_18 AC 129 ms
92,268 KB
testcase_19 AC 201 ms
92,636 KB
testcase_20 AC 299 ms
93,020 KB
testcase_21 AC 319 ms
93,504 KB
testcase_22 AC 432 ms
93,636 KB
testcase_23 AC 433 ms
93,396 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())

def query(X):
    X = list(X)
    X.sort()
    print('?', len(X), flush=True)
    print(*X, flush=True)

A = set(range(1, n+1))
NG = set()
for i in range(1, n+1):
    A.remove(i)
    query(A)
    ans = int(input())
    if ans == 1:
        NG.add(i)
    A.add(i)
ANS = []
for i in range(1, n+1):
    if i not in NG:
        ANS.append(i)
print('!', len(ANS), flush=True)
print(*ANS)
0