結果

問題 No.2711 Connecting Lights
ユーザー nikoro256nikoro256
提出日時 2024-03-31 14:34:42
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 356 ms / 5,000 ms
コード長 330 bytes
コンパイル時間 159 ms
コンパイル使用メモリ 81,700 KB
実行使用メモリ 82,120 KB
最終ジャッジ日時 2024-03-31 14:34:46
合計ジャッジ時間 4,559 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 38 ms
53,460 KB
testcase_01 AC 37 ms
53,460 KB
testcase_02 AC 42 ms
60,028 KB
testcase_03 AC 35 ms
53,460 KB
testcase_04 AC 35 ms
53,460 KB
testcase_05 AC 50 ms
66,344 KB
testcase_06 AC 44 ms
60,016 KB
testcase_07 AC 45 ms
62,360 KB
testcase_08 AC 49 ms
64,424 KB
testcase_09 AC 257 ms
79,400 KB
testcase_10 AC 117 ms
78,632 KB
testcase_11 AC 168 ms
81,064 KB
testcase_12 AC 120 ms
78,632 KB
testcase_13 AC 121 ms
79,420 KB
testcase_14 AC 50 ms
64,424 KB
testcase_15 AC 92 ms
72,488 KB
testcase_16 AC 49 ms
66,344 KB
testcase_17 AC 50 ms
66,344 KB
testcase_18 AC 54 ms
66,472 KB
testcase_19 AC 146 ms
79,912 KB
testcase_20 AC 136 ms
79,428 KB
testcase_21 AC 49 ms
66,344 KB
testcase_22 AC 45 ms
62,356 KB
testcase_23 AC 47 ms
66,624 KB
testcase_24 AC 133 ms
77,992 KB
testcase_25 AC 189 ms
78,504 KB
testcase_26 AC 356 ms
82,120 KB
testcase_27 AC 208 ms
82,120 KB
testcase_28 AC 356 ms
82,120 KB
testcase_29 AC 197 ms
82,120 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N,M,K=map(int,input().split())
dp=[[0]*(2**N) for _ in range(M)]
dp[0]=[1]*(2**N)
p=998244353
for i in range(M-1):
    for j in range(2**N):
        for k in range(2**N):
            if (k&j).bit_count()>=K:
                dp[i+1][k]+=dp[i][j]
                dp[i+1][k]%=p
ans=0
for d in dp[-1]:
    ans+=d
    ans%=p
print(ans)
0