結果

問題 No.1689 Set Cards
ユーザー Keroru
提出日時 2021-09-25 08:54:51
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 233 bytes
コンパイル時間 142 ms
コンパイル使用メモリ 82,040 KB
実行使用メモリ 66,896 KB
最終ジャッジ日時 2024-07-05 11:59:25
合計ジャッジ時間 2,403 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample WA * 2 RE * 1
other AC * 1 WA * 7 RE * 15
権限があれば一括ダウンロードができます

ソースコード

diff #

n=int(input())
N=2**n
d=[0]*N
d[-1]=1
m=998244353
for i in range(n):
    b=0
    k,*c=map(int,input().split())
    for x in c:
        b+=1<<(x-1)
    for i in range(N-1,-1,-1):
        d[i&b]+=d[i]
        d[i&b]%=m
print(d[0])
    
0