結果
問題 | No.2134 -algebra over Finite Set |
ユーザー |
![]() |
提出日時 | 2022-11-26 04:41:48 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 343 ms / 2,000 ms |
コード長 | 327 bytes |
コンパイル時間 | 221 ms |
コンパイル使用メモリ | 82,176 KB |
実行使用メモリ | 82,588 KB |
最終ジャッジ日時 | 2024-10-07 07:44:55 |
合計ジャッジ時間 | 3,220 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 17 |
ソースコード
n,m = map(int,input().split())mask = (1<<n) - 1v = [mask] * nfor i in range(m):l = list(map(int,input().split()))a = 0w = [0] * nfor j in range(1, l[0] + 1):a ^= 1 << (l[j]-1)w[l[j]-1] += 1b = mask ^ afor j in range(n):if w[j] == 1:v[j] &= aelse:v[j] &= bprint(pow(2,len(set(v)),998244353))