結果
| 問題 |
No.2711 Connecting Lights
|
| コンテスト | |
| ユーザー |
sepa38
|
| 提出日時 | 2024-02-06 20:43:09 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 401 bytes |
| コンパイル時間 | 398 ms |
| コンパイル使用メモリ | 82,304 KB |
| 実行使用メモリ | 82,732 KB |
| 最終ジャッジ日時 | 2024-09-28 12:12:30 |
| 合計ジャッジ時間 | 16,786 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 25 WA * 2 |
ソースコード
n, m, k = map(int, input().split())
mod = 998244353
dp = [[0] * 2 ** n for _ in range(m)]
dp[0] = [1] * 2 ** n
ls = []
for i in range(2**n):
if bin(i).count("1") >= k:
ls.append(i)
for i in range(1, m):
for j in ls:
for l in ls:
if bin(j & l).count("1") < k:
continue
dp[i][j] += dp[i-1][l]
dp[i][j] %= mod
ans = 0
for i in ls:
ans += dp[-1][i]
print(ans % mod)
sepa38