結果

問題 No.2711 Connecting Lights
ユーザー るこーそーるこーそー
提出日時 2024-09-25 15:49:14
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 3,542 ms / 5,000 ms
コード長 325 bytes
コンパイル時間 321 ms
コンパイル使用メモリ 82,376 KB
実行使用メモリ 83,128 KB
最終ジャッジ日時 2024-09-25 15:49:49
合計ジャッジ時間 30,594 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 39 ms
52,736 KB
testcase_01 AC 41 ms
52,560 KB
testcase_02 AC 51 ms
66,228 KB
testcase_03 AC 36 ms
52,204 KB
testcase_04 AC 37 ms
51,824 KB
testcase_05 AC 91 ms
77,704 KB
testcase_06 AC 64 ms
76,408 KB
testcase_07 AC 64 ms
76,400 KB
testcase_08 AC 98 ms
76,504 KB
testcase_09 AC 2,123 ms
80,368 KB
testcase_10 AC 1,585 ms
79,048 KB
testcase_11 AC 2,778 ms
81,608 KB
testcase_12 AC 741 ms
79,368 KB
testcase_13 AC 821 ms
80,020 KB
testcase_14 AC 120 ms
76,832 KB
testcase_15 AC 490 ms
78,316 KB
testcase_16 AC 92 ms
77,760 KB
testcase_17 AC 99 ms
77,680 KB
testcase_18 AC 155 ms
77,416 KB
testcase_19 AC 2,257 ms
80,792 KB
testcase_20 AC 916 ms
80,244 KB
testcase_21 AC 92 ms
77,484 KB
testcase_22 AC 65 ms
76,744 KB
testcase_23 AC 72 ms
77,740 KB
testcase_24 AC 1,348 ms
78,428 KB
testcase_25 AC 1,610 ms
79,044 KB
testcase_26 AC 3,542 ms
83,128 KB
testcase_27 AC 3,352 ms
82,708 KB
testcase_28 AC 3,454 ms
82,964 KB
testcase_29 AC 3,278 ms
82,664 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

MOD=998244353

n,m,k=map(int,input().split())
dp=[[0]*(1<<n) for _ in range(m)]
dp[0]=[1]*(1<<n)
for i in range(m-1):
    for bit in range(1<<n):
        for nbit in range(1<<n):
            if bin(bit&nbit).count('1')>=k:
                dp[i+1][nbit]+=dp[i][bit]
                dp[i+1][nbit]%=MOD

print(sum(dp[m-1])%MOD)
0