結果
| 問題 | No.2711 Connecting Lights |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-03-31 13:53:58 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
AC
|
| 実行時間 | 2,201 ms / 5,000 ms |
| コード長 | 290 bytes |
| 記録 | |
| コンパイル時間 | 208 ms |
| コンパイル使用メモリ | 84,864 KB |
| 実行使用メモリ | 81,068 KB |
| 最終ジャッジ日時 | 2026-04-16 20:33:01 |
| 合計ジャッジ時間 | 19,954 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge1_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 27 |
ソースコード
n, m, K = map(int, input().split())
mod = 998244353
dp = [1] * (1 << n)
for i in range(m - 1):
ndp = [0] * (1 << n)
for j in range(1 << n):
for k in range(1 << n):
# dp[j]→ndp[k]
if bin(j & k).count('1') >= K:
ndp[k] += dp[j]
ndp[k] %= mod
dp = ndp
print(sum(dp) % mod)