Orange Boy Can't You Solve It Out? Ep. 59

思考题 aimed for inexperienced participants?

Silenced!

Ookami and her teammates are taking an English class. The team has n people(animals?) in total. Initially, each person can raise his/her hand and speak freely. However, once a student has raised his/her hand for k times, he/she will be silenced and will not be able to raise again. The silence effect is removed only when the whole group are silenced.

XGN has noted that there are totally m hand raises from Ookami's group. How many different sequences of hand raising are there mod 998244353? Two sequences are different if there exists an integer i such that the i-th hand raise is raised by different people.

Example

Example 1

n=2,k=1,m=3

Ans=4

If the two people are called 1 and 2. The sequences are: [1,2,1],[1,2,2],[2,1,1],[2,1,2]. Note that [1,1,2] is not valid as 1 is silenced in the second hand raise.

Example 2

n=2,k=2,m=3

Ans=6

Note that each person can raise their hands twice: [1,1,2],[1,2,1],[1,2,2],[2,1,1],[2,1,2],[2,2,1]

Constraints

1\leq n,m,k\leq 10^9

版权声明:
作者:XGN
链接:https://blog.hellholestudios.top/archives/1217
来源:Hell Hole Studios Blog
文章版权归作者所有,未经允许请勿转载。

THE END
分享
二维码
< <上一篇
下一篇>>
文章目录
关闭
目 录