結果

問題 No.2134 $\sigma$-algebra over Finite Set
ユーザー tassei903tassei903
提出日時 2022-11-26 08:27:35
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 173 ms / 2,000 ms
コード長 525 bytes
コンパイル時間 152 ms
コンパイル使用メモリ 82,428 KB
実行使用メモリ 78,428 KB
最終ジャッジ日時 2024-04-16 12:52:20
合計ジャッジ時間 2,206 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 37 ms
52,096 KB
testcase_01 AC 173 ms
78,336 KB
testcase_02 AC 173 ms
78,428 KB
testcase_03 AC 37 ms
52,096 KB
testcase_04 AC 38 ms
52,480 KB
testcase_05 AC 37 ms
52,096 KB
testcase_06 AC 47 ms
67,328 KB
testcase_07 AC 48 ms
68,608 KB
testcase_08 AC 36 ms
52,096 KB
testcase_09 AC 37 ms
52,096 KB
testcase_10 AC 61 ms
76,256 KB
testcase_11 AC 61 ms
76,288 KB
testcase_12 AC 77 ms
76,664 KB
testcase_13 AC 106 ms
76,588 KB
testcase_14 AC 52 ms
68,992 KB
testcase_15 AC 56 ms
73,728 KB
testcase_16 AC 57 ms
71,680 KB
testcase_17 AC 38 ms
52,096 KB
testcase_18 AC 38 ms
52,096 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = lambda :sys.stdin.readline()[:-1]
ni = lambda :int(input())
na = lambda :list(map(int,input().split()))
yes = lambda :print("yes");Yes = lambda :print("Yes");YES = lambda : print("YES")
no = lambda :print("no");No = lambda :print("No");NO = lambda : print("NO")
#######################################################################
mod = 998244353
n, m = na()
a = [0] * n
z = 1
for i in range(m):
    p = na()
    for j in p[1:]:
        a[j-1] |= z
    z <<= 1

ans = len(set(a))
print(pow(2,ans, mod))
0