結果
| 問題 |
No.2711 Connecting Lights
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-01-22 19:58:24 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 402 bytes |
| コンパイル時間 | 179 ms |
| コンパイル使用メモリ | 12,800 KB |
| 実行使用メモリ | 28,960 KB |
| 最終ジャッジ日時 | 2024-09-28 06:32:30 |
| 合計ジャッジ時間 | 7,198 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 6 TLE * 1 -- * 20 |
ソースコード
MOD = 998244353
N, M, K = map(int, input().split())
dp = [[0 for i in range(1 << N)] for j in range(M)]
ans = 0
for i in range(1 << N):
dp[0][i] = 1
for i in range(M - 1):
for bit in range(1 << N):
for next in range(1 << N):
if bin(bit & next).count("1") >= K:
dp[i + 1][next] += dp[i][bit]
dp[i + 1][next] %= MOD
print(sum(dp[M - 1]) % MOD)