結果
問題 | No.2134 $\sigma$-algebra over Finite Set |
ユーザー |
|
提出日時 | 2022-11-25 23:56:58 |
言語 | PyPy3 (7.3.8) |
結果 |
AC
|
実行時間 | 294 ms / 2,000 ms |
コード長 | 821 Byte |
コンパイル時間 | 336 ms |
使用メモリ | 86,184 KB |
最終ジャッジ日時 | 2022-11-29 19:44:05 |
合計ジャッジ時間 | 4,223 ms |
ジャッジサーバーID (参考情報) |
judge13 / judge12 |
テストケース
テストケース表示入力 | 結果 | 実行時間 使用メモリ |
---|---|---|
testcase_00 | AC | 103 ms
76,556 KB |
testcase_01 | AC | 279 ms
86,132 KB |
testcase_02 | AC | 294 ms
86,184 KB |
testcase_03 | AC | 105 ms
76,548 KB |
testcase_04 | AC | 105 ms
76,636 KB |
testcase_05 | AC | 103 ms
76,652 KB |
testcase_06 | AC | 119 ms
82,544 KB |
testcase_07 | AC | 118 ms
82,544 KB |
testcase_08 | AC | 102 ms
76,548 KB |
testcase_09 | AC | 104 ms
76,584 KB |
testcase_10 | AC | 129 ms
82,916 KB |
testcase_11 | AC | 129 ms
83,012 KB |
testcase_12 | AC | 156 ms
83,032 KB |
testcase_13 | AC | 194 ms
83,596 KB |
testcase_14 | AC | 123 ms
82,656 KB |
testcase_15 | AC | 126 ms
82,692 KB |
testcase_16 | AC | 121 ms
82,700 KB |
testcase_17 | AC | 101 ms
76,708 KB |
testcase_18 | AC | 100 ms
76,612 KB |
ソースコード
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)