问题 B: Bloodline Counter
内存限制:512 MB
时间限制:2.000 S
评测方式:文本比较
命题人:
提交:1
解决:1
题目描述
A tournament is a directed graph obtained by assigning a direction for each edge in an undirected complete
graph.
We say a tournament is grand, if and only if the largest directed cycle in the tournament contains exactly
k vertices.
Please count the number of different labeled grand tournaments of n vertices modulo 998 244 353.
输入
The first line contains two integers n and k (3 ≤ k ≤ n ≤ 5×105
), as explained in the problem statement.
输出
Output an integer representing the answer modulo 998 244 353.
样例输入 复制
3 3
样例输出 复制
2