結果

問題 No.2134 $\sigma$-algebra over Finite Set
ユーザー 👑 rin204rin204
提出日時 2022-11-25 22:49:54
言語 PyPy3
(7.3.13)
結果
WA  
実行時間 -
コード長 307 bytes
コンパイル時間 959 ms
コンパイル使用メモリ 87,068 KB
実行使用メモリ 78,272 KB
最終ジャッジ日時 2023-07-25 10:59:13
合計ジャッジ時間 5,042 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 AC 95 ms
77,036 KB
testcase_07 AC 96 ms
77,084 KB
testcase_08 AC 74 ms
71,548 KB
testcase_09 AC 73 ms
71,288 KB
testcase_10 WA -
testcase_11 WA -
testcase_12 AC 180 ms
77,232 KB
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 AC 77 ms
71,284 KB
testcase_18 AC 76 ms
71,176 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n, m = map(int, input().split())
base = [(1 << n) - 1]
for _ in range(m):
    l, *A = map(int, input().split())
    bit = 0
    for a in A:
        bit |= 1 << a
    for b in base:
        if b ^ bit < bit:
            bit ^= b
    if bit != 0:
        base.append(bit)

print(pow(2, len(base), 998244353))
0