結果

問題 No.1689 Set Cards
ユーザー KeroruKeroru
提出日時 2021-09-25 08:59:16
言語 PyPy3
(7.3.15)
結果
RE  
実行時間 -
コード長 225 bytes
コンパイル時間 417 ms
コンパイル使用メモリ 87,136 KB
実行使用メモリ 79,256 KB
最終ジャッジ日時 2023-09-18 22:50:11
合計ジャッジ時間 4,912 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 73 ms
71,236 KB
testcase_01 AC 71 ms
71,236 KB
testcase_02 RE -
testcase_03 AC 106 ms
78,172 KB
testcase_04 AC 103 ms
78,184 KB
testcase_05 AC 108 ms
78,332 KB
testcase_06 AC 105 ms
78,320 KB
testcase_07 WA -
testcase_08 AC 73 ms
71,416 KB
testcase_09 AC 72 ms
71,568 KB
testcase_10 AC 78 ms
76,060 KB
testcase_11 RE -
testcase_12 RE -
testcase_13 RE -
testcase_14 RE -
testcase_15 RE -
testcase_16 RE -
testcase_17 RE -
testcase_18 RE -
testcase_19 RE -
testcase_20 RE -
testcase_21 RE -
testcase_22 RE -
testcase_23 RE -
testcase_24 RE -
testcase_25 RE -
権限があれば一括ダウンロードができます

ソースコード

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):
        d[i&b]+=d[i]
        d[i&b]%=m
print(d[0])
    
0