CF1278F.Cards
普及/提高-
通过率:0%
AC君温馨提醒
该题目为【codeforces】题库的题目,您提交的代码将被提交至codeforces进行远程评测,并由ACGO抓取测评结果后进行展示。由于远程测评的测评机由其他平台提供,我们无法保证该服务的稳定性,若提交后无反应,请等待一段时间后再进行重试。
题目描述
Consider the following experiment. You have a deck of m cards, and exactly one card is a joker. n times, you do the following: shuffle the deck, take the top card of the deck, look at it and return it into the deck.
Let x be the number of times you have taken the joker out of the deck during this experiment. Assuming that every time you shuffle the deck, all m! possible permutations of cards are equiprobable, what is the expected value of xk ? Print the answer modulo 998244353 .
输入格式
The only line contains three integers n , m and k ( 1≤n,m<998244353 , 1≤k≤5000 ).
输出格式
Print one integer — the expected value of xk , taken modulo 998244353 (the answer can always be represented as an irreducible fraction ba , where bmod998244353=0 ; you have to print a⋅b−1mod998244353 ).
输入输出样例
输入#1
1 1 1
输出#1
1
输入#2
1 1 5000
输出#2
1
输入#3
2 2 2
输出#3
499122178
输入#4
998244352 1337 5000
输出#4
326459680