#P7158. 「dWoi R1」Password of Shady

「dWoi R1」Password of Shady

Description

This problem asks Shuichi to construct an nn-digit number that satisfies the following two requirements:

  • "The strong never talk nonsense" means the number has no leading zeros. 00 has no leading zeros and is a one-digit number.
  • "The strong are good at forming kk pairs to cooperate" means among all digits of this number, there are an even number of digit kk. 00 is an even number.

Shuichi quickly had Iruma make a number generator, but the generator still needs the count of numbers that satisfy the requirements. So he asked you for help. Since making the generator already took 59.5 s, he wants you to compute how many numbers satisfy the requirements in 0.5 s.

Output the answer modulo 998 244 353998\ 244\ 353.

Input Format

This problem has multiple test cases, with tt test cases.
For each test case, one line contains two integers n,kn, k.

Output Format

For each test case, output one integer per line representing the answer.

2
2 3
11 4
73
842367440

Hint

Explanation for Sample 1

For the first test case, the numbers that satisfy the requirements are:

  • 00 occurrences of digit 33: 101210 \sim 12, 142214 \sim 22, 242924 \sim 29, 404240 \sim 42, 445244 \sim 52, 546254 \sim 62, 647264 \sim 72, 748274 \sim 82, 849284 \sim 92, 949994 \sim 99.
  • 22 occurrences of digit 33: 3333.

The sample explanation for the second test case had 114514 lines, but 0.1 s before the contest it was accidentally stolen by Monokuma, and the bookworm (shūchóng, 书虫) did not have time to make up for it.

Constraints and Notes

This problem uses bundled tests.

  • Subtask 1 (5 pts): n=1n=1.
  • Subtask 2 (25 pts): n6n \le 6.
  • Subtask 3 (25 pts): t100t \le 100.
  • Subtask 4 (45 pts): no special restrictions.

For 100%100\% of the testdata, 1n1051 \le n \le 10^5, 1k91 \le k \le 9, 1t1061 \le t \le 10^6.


Postscript: You computed the answer in 0.5 s and it was correct, but when Shuichi entered the constructed number into the password dial, it was wrong. So this was a lie, and Shuichi still has to gather "truth bullets" to fight the class trial (

Translated by ChatGPT 5