| I SBC São Paulo Programming Marathon |
|---|
| Закончено |
Matheus practices kickboxing and spends a lot of time working on his kicks. In his kick training, he performs several consecutive kicks and then rests a bit, thus dividing his training into several series of kicks. However, as Matheus gets tired during the training, he never performs a series of consecutive kicks with more kicks than the previous series.
Matheus wants to train to achieve a total of $$$N$$$ kicks and is curious to know how many different ways he can divide his series of kicks without ever increasing the number of consecutive kicks. Additionally, he never performs a series of $$$K$$$ kicks because he finds it boring. For example, if $$$N = 4$$$ and $$$K = 3$$$, there are $$$4$$$ ways to divide his series:
Note that in none of the possibilities does Matheus perform a series with $$$3$$$ consecutive kicks, because we have $$$K = 3$$$. Furthermore, in none of the possible trainings does he perform a series of $$$2$$$ kicks after a series of a single kick, as he cannot perform a series with more kicks than the previous one.
Matheus now wants your help to find out how many ways he can divide his training. Since the number of ways can be very large, print the answer modulo $$$998244353$$$.
The input consists of a single line containing two integers, $$$N$$$ and $$$K$$$ $$$(1 \le N \le 4000, 1 \le K \le N)$$$.
The output should contain only a single integer, the answer modulo $$$998244353$$$.
2 1
1
4 3
4
100 7
108559115
| Название |
|---|


