結果

問題 No.2134 $\sigma$-algebra over Finite Set
ユーザー shobonvipshobonvip
提出日時 2022-11-25 23:31:21
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 356 bytes
コンパイル時間 289 ms
コンパイル使用メモリ 82,088 KB
実行使用メモリ 77,220 KB
最終ジャッジ日時 2024-04-10 04:33:43
合計ジャッジ時間 2,940 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 38 ms
52,328 KB
testcase_01 AC 242 ms
76,892 KB
testcase_02 AC 223 ms
76,888 KB
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 AC 65 ms
75,816 KB
testcase_07 AC 68 ms
76,000 KB
testcase_08 AC 36 ms
53,352 KB
testcase_09 AC 37 ms
53,376 KB
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 AC 198 ms
77,220 KB
testcase_14 WA -
testcase_15 AC 88 ms
76,612 KB
testcase_16 WA -
testcase_17 AC 37 ms
52,416 KB
testcase_18 AC 37 ms
52,544 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n,m = map(int,input().split())

mask = (1 << n) - 1
base = [mask]

for i in range(m):
	l = list(map(int,input().split()))
	v = 0
	for j in range(1, l[0]+1):
		v ^= 1 << (l[j] - 1)
	w = mask ^ v
	for e in base:
		v = min(v, v ^ e)
	if v: base.append(v)
	for e in base:
		w = min(w, w ^ e)
	if w: base.append(w)

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