You have $$$n$$$ chips, and you are going to place all of them in one of $$$x$$$ points, numbered from $$$1$$$ to $$$x$$$. There can be multiple chips in each point.
After placing the chips, you can perform the following four operations (in any order, any number of times):
Note that the coordinates of the chips you place during the operations cannot be less than $$$1$$$, but can be greater than $$$x$$$.
Denote the cost of chip placement as the minimum number of chips which can be present on the line after you perform these operations, starting from the placement you've chosen.
For example, the cost of placing two chips in points $$$3$$$ and one chip in point $$$5$$$ is $$$2$$$, because you can reduce the number of chips to $$$2$$$ as follows:
You are given three integers $$$n$$$, $$$x$$$ and $$$m$$$. Calculate the number of placements of exactly $$$n$$$ chips in points from $$$1$$$ to $$$x$$$ having cost equal to $$$m$$$, and print it modulo $$$998244353$$$. Two placements are considered different if the number of chips in some point differs between these placements.
The only line contains three integers $$$n$$$, $$$x$$$ and $$$m$$$ ($$$1 \le m \le n \le 1000$$$; $$$2 \le x \le 10$$$).
Print one integer — the number of placements with cost equal to $$$m$$$, taken modulo $$$998244353$$$.
2 3 1
5
42 10 5
902673363
1000 10 8
187821763
In the first example, there are five ways to place $$$2$$$ chips in points from $$$1$$$ to $$$3$$$ so that the cost is $$$1$$$:
Name |
---|