結果

問題 No.2134 $\sigma$-algebra over Finite Set
ユーザー とりゐとりゐ
提出日時 2022-11-25 22:24:54
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 311 bytes
コンパイル時間 502 ms
コンパイル使用メモリ 82,832 KB
実行使用メモリ 77,432 KB
最終ジャッジ日時 2024-04-10 03:36:05
合計ジャッジ時間 3,171 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 40 ms
52,820 KB
testcase_01 AC 269 ms
77,196 KB
testcase_02 AC 256 ms
77,432 KB
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 AC 67 ms
76,044 KB
testcase_07 AC 66 ms
76,016 KB
testcase_08 AC 41 ms
52,592 KB
testcase_09 AC 43 ms
53,192 KB
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 AC 196 ms
76,936 KB
testcase_14 WA -
testcase_15 AC 103 ms
76,684 KB
testcase_16 WA -
testcase_17 AC 42 ms
52,620 KB
testcase_18 AC 41 ms
53,064 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def add(v):
  for i in now:
    v=min(v,v^i)
  if v!=0:
    now.append(v)

now=[]


n,m=map(int,input().split())
mask=(2**n)-1
add(0)
add(mask)
for i in range(m):
  a=list(map(lambda x:int(x)-1,input().split()))
  tmp=0
  for i in a[1:]:
    tmp|=1<<i
  add(tmp)
  add(mask-tmp)
print(pow(2,len(now),998244353))
0