1197: tingbao打游戏
Memory Limit:128 MB
Time Limit:1.000 S
Judge Style:Text Compare
Creator:
Submit:5
Solved:1
Description
不允许普通用户打印题目,请教师登录后使用。如有疑问请联系管理员!
Input
第一行有两个整数 n,p,其中 1⩽n⩽1000,1⩽p⩽1e9+7
第二行有 n个整数,分别为 a1,a2,⋯an,其中 1⩽ai⩽p−1
因为答案可能很大,请对 p 取模。
Output
输出n+1个整数,分别表示得到x个徽章后,可能的路径数。
因为答案可能很大,请对根据输入的 p 进行取模
Sample Input Copy
5 998244353
1 2 3 4 5
Sample Output Copy
1 15 85 225 274 120