CF1671F.Permutation Counting
普及/提高-
通过率:0%
AC君温馨提醒
该题目为【codeforces】题库的题目,您提交的代码将被提交至codeforces进行远程评测,并由ACGO抓取测评结果后进行展示。由于远程测评的测评机由其他平台提供,我们无法保证该服务的稳定性,若提交后无反应,请等待一段时间后再进行重试。
题目描述
Calculate the number of permutations p of size n with exactly k inversions (pairs of indices (i,j) such that i<j and pi>pj ) and exactly x indices i such that pi>pi+1 .
Yep, that's the whole problem. Good luck!
输入格式
The first line contains one integer t ( 1≤t≤3⋅104 ) — 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 ).
输出格式
For each test case, print one integer — the answer to the problem, taken modulo 998244353 .
输入输出样例
输入#1
5 10 6 4 7 3 1 163316 11 7 136373 11 1 325902 11 11
输出#1
465 12 986128624 7636394 57118194