← Home
write a go solution for Description:
Calculate the number of permutations p of size n with exactly k inversions (pairs of indices (i,j) such that i<j and p_i>p_j) and exactly x indices i such that p_i>p_i+1.

Yep, that's the whole problem. Good luck!

Input Format:
The first line contains one integer t (1<=t<=3*10^4) — the number of test cases.

Each test case consists of one line which contains three integers n, k and x (1<=n<=998244352; 1<=k<=11; 1<=x<=11).

Output Format:
For each test case, print one integer — the answer to the problem, taken modulo 998244353.

Note:
None. Output only the code with no comments, explanation, or additional text.