CF1916H2.Matrix Rank (Hard Version)
普及/提高-
通过率:0%
AC君温馨提醒
该题目为【codeforces】题库的题目,您提交的代码将被提交至codeforces进行远程评测,并由ACGO抓取测评结果后进行展示。由于远程测评的测评机由其他平台提供,我们无法保证该服务的稳定性,若提交后无反应,请等待一段时间后再进行重试。
题目描述
This is the hard version of the problem. The only differences between the two versions of this problem are the constraints on k . You can make hacks only if all versions of the problem are solved.
You are given integers n , p and k . p is guaranteed to be a prime number.
For each r from 0 to k , find the number of n×n matrices A of the field † of integers modulo p such that the rank ‡ of A is exactly r . Since these values are big, you are only required to output them modulo 998244353 .
输入格式
The first line of input contains three integers n , p and k ( 1≤n≤1018 , 2≤p<998244353 , 0≤k≤5⋅105 ).
It is guaranteed that p is a prime number.
输出格式
Output k+1 integers, the answers for each r from 0 to k .
输入输出样例
输入#1
3 2 3
输出#1
1 49 294 168
输入#2
1 51549919 2
输出#2
1 51549918 0