1. Management Headache Laminar org is trying a new work hierarchy also known as flat…
- User
- Management Headache
Laminar org is trying a new work hierarchy also known as flat hierarchy management model, where all engineers belong to the same level. Each engineer reports to one of the managers in Laminar.
There are N engineer and M managers. Laminar execs are interested in knowing how many ways they can assign managers to the engineers in this new flat hierarchy model in order to understand this model more. However since these engineers sit in a straight and engineers sitting adjacent to each other tend to chat a lot, one manager should not be assigned more than K pairs of engineers sitting next to each other to keep their sanity.
You have to find the number of ways these M managers can be assigned to the N engineers. It's not necessary for every manager to be assigned an engineer but every engineer must be assigned a manager.
Since this number can be very large, print it modulo 998244353.
Constraints
0 <N, M <= 2e5
- 0 <= K <N
Sample Input 0
321
Sample Output 0
6
Explanation
Let engineers are E1, E2, and E3, and managers are M1, and M2.
The number of ways to assign a manager would be 6.
1 Rightarrow E1 M1 E 2 M1 E 3->M2
2 Rightarrow E1 M1 E 2 M2, E 3 M1
3 Rightarrow E1 M1 E 2->M2 E 3 M2
4 Rightarrow E1 M2, E 2 M1 E 3 M1
5 Rightarrow E1 M2, E 2 M1 E 3->M2
6 Rightarrow E1 M2, E 2 M2, E 3 M1
- Assistant