結果

問題 No.934 Explosive energy drink
ユーザー tamatotamato
提出日時 2020-01-31 17:02:46
言語 PyPy3
(7.3.15)
結果
RE  
実行時間 -
コード長 704 bytes
コンパイル時間 1,660 ms
コンパイル使用メモリ 86,628 KB
実行使用メモリ 94,824 KB
平均クエリ数 708.92
最終ジャッジ日時 2023-09-23 19:33:13
合計ジャッジ時間 8,565 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 RE -
testcase_01 AC 337 ms
94,188 KB
testcase_02 AC 88 ms
87,340 KB
testcase_03 AC 210 ms
93,520 KB
testcase_04 AC 428 ms
93,904 KB
testcase_05 AC 86 ms
87,144 KB
testcase_06 RE -
testcase_07 WA -
testcase_08 WA -
testcase_09 AC 87 ms
86,488 KB
testcase_10 AC 87 ms
87,188 KB
testcase_11 AC 90 ms
86,684 KB
testcase_12 AC 100 ms
92,180 KB
testcase_13 AC 102 ms
91,944 KB
testcase_14 AC 106 ms
92,648 KB
testcase_15 AC 198 ms
93,528 KB
testcase_16 AC 115 ms
92,748 KB
testcase_17 AC 142 ms
93,196 KB
testcase_18 AC 149 ms
93,504 KB
testcase_19 AC 185 ms
93,232 KB
testcase_20 AC 236 ms
93,764 KB
testcase_21 AC 246 ms
92,988 KB
testcase_22 AC 320 ms
93,668 KB
testcase_23 AC 313 ms
94,140 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def main():
    import sys
    input = sys.stdin.readline

    def ask(A):
        print('?', len(A))
        print(*A)
        sys.stdout.flush()

    N = int(input())
    need = [1] * N
    for i in range(N):
        q = []
        need[i] = 0
        for j in range(N):
            if need[j]:
                q.append(j+1)
        if len(q) == 1:
            need[i] = 1
            need[q[0]] = 1
            continue
        ask(q)
        e = int(input())
        if not e:
            need[i] = 1
    ans = []
    for i in range(N):
        if need[i]:
            ans.append(i+1)
    print('!', len(ans))
    print(*ans)
    sys.stdout.flush()
    exit()


if __name__ == '__main__':
    main()
0