結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 77 ms
71,004 KB
testcase_01 AC 290 ms
78,004 KB
testcase_02 AC 287 ms
77,940 KB
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 AC 95 ms
77,116 KB
testcase_07 AC 98 ms
77,044 KB
testcase_08 AC 74 ms
71,116 KB
testcase_09 AC 74 ms
71,204 KB
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 AC 206 ms
77,856 KB
testcase_14 WA -
testcase_15 AC 115 ms
77,480 KB
testcase_16 WA -
testcase_17 AC 76 ms
71,456 KB
testcase_18 AC 76 ms
71,380 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 - 1
    for b in base:
        if b ^ bit < bit:
            bit ^= b
    if bit != 0:
        base.append(bit)

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