結果

問題 No.2134 $\sigma$-algebra over Finite Set
ユーザー shotoyooshotoyoo
提出日時 2022-11-25 23:56:58
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 226 ms / 2,000 ms
コード長 821 bytes
コンパイル時間 202 ms
コンパイル使用メモリ 82,432 KB
実行使用メモリ 80,380 KB
最終ジャッジ日時 2024-04-16 12:51:17
合計ジャッジ時間 2,586 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 45 ms
54,144 KB
testcase_01 AC 217 ms
80,380 KB
testcase_02 AC 226 ms
80,000 KB
testcase_03 AC 45 ms
54,016 KB
testcase_04 AC 46 ms
55,168 KB
testcase_05 AC 43 ms
53,760 KB
testcase_06 AC 59 ms
71,808 KB
testcase_07 AC 57 ms
73,600 KB
testcase_08 AC 42 ms
54,144 KB
testcase_09 AC 42 ms
54,016 KB
testcase_10 AC 68 ms
77,056 KB
testcase_11 AC 71 ms
77,184 KB
testcase_12 AC 95 ms
77,312 KB
testcase_13 AC 130 ms
77,824 KB
testcase_14 AC 61 ms
74,368 KB
testcase_15 AC 66 ms
76,992 KB
testcase_16 AC 67 ms
76,940 KB
testcase_17 AC 42 ms
53,760 KB
testcase_18 AC 42 ms
53,888 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys, random
input = lambda : sys.stdin.readline().rstrip()


write = lambda x: sys.stdout.write(x+"\n"); writef = lambda x: print("{:.12f}".format(x))
debug = lambda x: sys.stderr.write(x+"\n")
YES="Yes"; NO="No"; pans = lambda v: print(YES if v else NO); INF=10**18
LI = lambda : list(map(int, input().split())); II=lambda : int(input()); SI=lambda : [ord(c)-ord("a") for c in input()]
def debug(_l_):
    for s in _l_.split():
        print(f"{s}={eval(s)}", end=" ")
    print()
def dlist(*l, fill=0):
    if len(l)==1:
        return [fill]*l[0]
    ll = l[1:]
    return [dlist(*ll, fill=fill) for _ in range(l[0])]

n,m = list(map(int, input().split()))
vs = [0]*n
for i in range(m):
    l = LI()
    for v in l[1:]:
        v -= 1
        vs[v] |= 1<<i
M = 998244353
ans = pow(2, len(set(vs)), M)
print(ans)
0