結果
| 問題 |
No.2711 Connecting Lights
|
| コンテスト | |
| ユーザー |
sepa38
|
| 提出日時 | 2024-02-06 21:00:31 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 412 bytes |
| コンパイル時間 | 395 ms |
| コンパイル使用メモリ | 81,928 KB |
| 実行使用メモリ | 82,908 KB |
| 最終ジャッジ日時 | 2024-09-28 12:13:13 |
| 合計ジャッジ時間 | 15,420 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 25 RE * 2 |
ソースコード
n, m, k = map(int, input().split())
assert m > 1
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