結果

問題 No.1689 Set Cards
ユーザー KeroruKeroru
提出日時 2021-09-25 09:01:16
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 110 ms / 2,000 ms
コード長 226 bytes
コンパイル時間 320 ms
コンパイル使用メモリ 86,996 KB
実行使用メモリ 77,024 KB
最終ジャッジ日時 2023-09-18 22:50:21
合計ジャッジ時間 3,802 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 80 ms
75,920 KB
testcase_01 AC 81 ms
75,956 KB
testcase_02 AC 81 ms
76,080 KB
testcase_03 AC 86 ms
75,920 KB
testcase_04 AC 81 ms
75,968 KB
testcase_05 AC 81 ms
76,068 KB
testcase_06 AC 79 ms
76,020 KB
testcase_07 AC 80 ms
76,180 KB
testcase_08 AC 76 ms
76,028 KB
testcase_09 AC 77 ms
75,908 KB
testcase_10 AC 79 ms
75,964 KB
testcase_11 AC 104 ms
76,852 KB
testcase_12 AC 103 ms
76,884 KB
testcase_13 AC 104 ms
76,700 KB
testcase_14 AC 110 ms
76,960 KB
testcase_15 AC 86 ms
76,372 KB
testcase_16 AC 100 ms
76,720 KB
testcase_17 AC 82 ms
76,140 KB
testcase_18 AC 106 ms
77,024 KB
testcase_19 AC 104 ms
76,832 KB
testcase_20 AC 102 ms
76,896 KB
testcase_21 AC 100 ms
76,856 KB
testcase_22 AC 103 ms
76,864 KB
testcase_23 AC 103 ms
76,984 KB
testcase_24 AC 102 ms
76,736 KB
testcase_25 AC 103 ms
76,852 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n=int(input())
N=2**12
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):
        d[i&b]+=d[i]
        d[i&b]%=m
print(d[0])
    
0