結果

問題 No.934 Explosive energy drink
ユーザー ptotqptotq
提出日時 2019-11-29 22:16:39
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 674 ms / 2,000 ms
コード長 326 bytes
コンパイル時間 198 ms
コンパイル使用メモリ 10,672 KB
実行使用メモリ 24,572 KB
平均クエリ数 709.58
最終ジャッジ日時 2023-09-23 18:42:49
合計ジャッジ時間 7,542 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 43 ms
23,544 KB
testcase_01 AC 668 ms
23,792 KB
testcase_02 AC 42 ms
24,300 KB
testcase_03 AC 326 ms
24,016 KB
testcase_04 AC 674 ms
24,572 KB
testcase_05 AC 42 ms
23,544 KB
testcase_06 AC 41 ms
24,324 KB
testcase_07 AC 41 ms
24,024 KB
testcase_08 AC 40 ms
23,928 KB
testcase_09 AC 41 ms
23,536 KB
testcase_10 AC 41 ms
23,340 KB
testcase_11 AC 41 ms
24,300 KB
testcase_12 AC 43 ms
23,680 KB
testcase_13 AC 49 ms
24,312 KB
testcase_14 AC 51 ms
23,520 KB
testcase_15 AC 209 ms
23,952 KB
testcase_16 AC 72 ms
24,012 KB
testcase_17 AC 118 ms
23,460 KB
testcase_18 AC 120 ms
24,240 KB
testcase_19 AC 249 ms
24,292 KB
testcase_20 AC 427 ms
24,336 KB
testcase_21 AC 464 ms
23,932 KB
testcase_22 AC 662 ms
23,976 KB
testcase_23 AC 669 ms
24,108 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
N = int(input())


def query(sym, n, args):
    print(sym, n)
    print(*args)
    sys.stdin.flush()

    if sym == '?':
        return int(input())


a = [0]*(N+1)
for i in range(1, N+1):
    a[i] = query('?', N-1, list(range(1, i)) + list(range(i+1, N+1))) ^ 1

query('!', sum(a), [i for i in range(N+1) if a[i]])
0