結果

問題 No.934 Explosive energy drink
ユーザー tamatotamato
提出日時 2020-01-31 16:57:40
言語 PyPy3
(7.3.15)
結果
RE  
実行時間 -
コード長 604 bytes
コンパイル時間 613 ms
コンパイル使用メモリ 87,112 KB
実行使用メモリ 97,384 KB
平均クエリ数 708.08
最終ジャッジ日時 2023-09-23 19:33:29
合計ジャッジ時間 14,813 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 RE -
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 RE -
testcase_05 RE -
testcase_06 RE -
testcase_07 RE -
testcase_08 WA -
testcase_09 RE -
testcase_10 WA -
testcase_11 RE -
testcase_12 RE -
testcase_13 RE -
testcase_14 RE -
testcase_15 RE -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 WA -
権限があれば一括ダウンロードができます

ソースコード

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)
        ask(q)
        e = int(input())
        if 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