結果

問題 No.934 Explosive energy drink
ユーザー tamatotamato
提出日時 2020-01-31 17:00:44
言語 PyPy3
(7.3.15)
結果
RE  
実行時間 -
コード長 608 bytes
コンパイル時間 1,110 ms
コンパイル使用メモリ 87,112 KB
実行使用メモリ 95,356 KB
平均クエリ数 709.08
最終ジャッジ日時 2023-09-23 19:32:49
合計ジャッジ時間 9,075 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 RE -
testcase_01 AC 334 ms
94,528 KB
testcase_02 AC 102 ms
87,400 KB
testcase_03 AC 230 ms
93,808 KB
testcase_04 AC 484 ms
94,512 KB
testcase_05 AC 106 ms
87,632 KB
testcase_06 RE -
testcase_07 RE -
testcase_08 RE -
testcase_09 AC 102 ms
87,568 KB
testcase_10 AC 107 ms
87,204 KB
testcase_11 AC 107 ms
87,212 KB
testcase_12 AC 115 ms
92,908 KB
testcase_13 AC 120 ms
92,596 KB
testcase_14 AC 123 ms
92,628 KB
testcase_15 AC 224 ms
93,536 KB
testcase_16 AC 133 ms
92,540 KB
testcase_17 AC 157 ms
93,640 KB
testcase_18 AC 164 ms
93,964 KB
testcase_19 AC 210 ms
94,020 KB
testcase_20 AC 266 ms
93,848 KB
testcase_21 AC 264 ms
93,524 KB
testcase_22 AC 331 ms
93,864 KB
testcase_23 AC 336 ms
94,232 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)
        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