#P8557. 炼金术(Alchemy)

炼金术(Alchemy)

Description

Ling is a girl who loves playing games.

In the game, she wants to smelt a rare alloy. To do this, she needs to combine nn kinds of metals.

After preparing the ores, she builds kk different furnaces. When a furnace starts, it will randomly produce some of these nn kinds of metals (and it may also produce nothing).

If we collect the metals produced by all furnaces, and we obtain all nn kinds of metals, then we can make the alloy. Mio is curious and says to Ling: "Let me test you. How many different outcomes can produce the alloy?" Ling can quickly solve this simple problem. Can you compute the result?

The answer may be very large. Please output it modulo 998244353998244353 (that is, the remainder after division by 998244353998244353).

Input Format

Input one line with two positive integers n,kn, k.

Output Format

Output one line with one integer, representing the answer.

2 2
9
4 5
923521
233 123
81633405

Hint

[Explanation of Sample 1]
For all successful outcomes, the metals produced by the two furnaces are shown in the table below:

No. 1 No. 2
\varnothing {1,2}\{1,2\}
{1}\{1\} {2}\{2\}
{1,2}\{1,2\}
{2}\{2\} {1}\{1\}
{1,2}\{1,2\}
{1,2}\{1,2\} \varnothing
{1}\{1\}
{2}\{2\}
{1,2}\{1,2\}

There are 99 outcomes in total, so the answer is 99.

[Constraints]
For 30%30\% of the testdata, 1n,k101 \le n, k \le 10.
For 80%80\% of the testdata, 1n,k1061 \le n, k \le 10^6.
For 100%100\% of the testdata, 1n,k1091 \le n, k \le 10^9.

Translated by ChatGPT 5