#P5401. [CTS2019] 珍珠

[CTS2019] 珍珠

Description

There are nn independent uniformly random integer variables in the range [1,D][1,D].

Find the probability that we can choose at least mm bottles, such that there exists a way to select some variables and put each selected variable into a bottle, satisfying that each bottle contains exactly two variables with the same value.

Output the value of the probability multiplied by DnD^n, taken modulo 998244353998244353. For the modulo details, refer to Problem 1.

Input Format

The input contains only one line with three integers D,n,mD,n,m separated by spaces.

Output Format

Output one integer, representing the required value of the probability multiplied by DnD^n modulo 998244353998244353.

2 2 1
2
8 10 4
301103104
998 1000 500
762913089

Hint

Sample 1 Explanation

Case 11: the first variable is 11, and the second variable is 11.

Case 22: the first variable is 11, and the second variable is 22.

Case 33: the first variable is 22, and the second variable is 11.

Case 44: the first variable is 22, and the second variable is 22.

In cases 11 and 44, we can put the two variables into one bottle.

In cases 22 and 33, the two variables have different values, so they cannot be put into the same bottle.

Testdata Convention

img

All test points satisfy $0 \leqslant m \leqslant 10^9,1 \leqslant n \leqslant 10^9,1 \leqslant D \leqslant 10^5$。

Translated by ChatGPT 5