結果

問題 No.2134 $\sigma$-algebra over Finite Set
ユーザー titiatitia
提出日時 2022-12-11 01:24:40
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 415 bytes
コンパイル時間 394 ms
コンパイル使用メモリ 82,476 KB
実行使用メモリ 77,724 KB
最終ジャッジ日時 2024-04-23 02:05:05
合計ジャッジ時間 4,342 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 35 ms
51,968 KB
testcase_01 WA -
testcase_02 WA -
testcase_03 AC 34 ms
51,712 KB
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 AC 302 ms
76,560 KB
testcase_11 AC 304 ms
76,512 KB
testcase_12 AC 325 ms
76,672 KB
testcase_13 AC 355 ms
76,988 KB
testcase_14 AC 109 ms
76,416 KB
testcase_15 AC 100 ms
76,416 KB
testcase_16 AC 92 ms
76,288 KB
testcase_17 AC 35 ms
52,096 KB
testcase_18 AC 35 ms
51,968 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = sys.stdin.readline

N,M=map(int,input().split())
mod=998244353

LIST=[]

ALL=(1<<N)-1

for i in range(M):
    A=list(map(int,input().split()))

    x=0
    for a in A[1:]:
        x|=1<<(a-1)

    y=ALL^x

    LIST.append(x)
    LIST.append(y)

BASE=[]

for i in range(N):
    k=ALL
    for l in LIST:
        if l & (1<<i) != 0:
            k=k&l
    BASE.append(k)

print(pow(2,len(BASE),mod))
0