当前你的浏览器版本过低,网站已在兼容模式下运行,兼容模式仅提供最小功能支持,网站样式可能显示不正常。
请尽快升级浏览器以体验网站在线编辑、在线运行等功能。

建议使用的浏览器:

谷歌Chrome 火狐Firefox Opera浏览器 微软Edge浏览器 QQ浏览器 360浏览器 傲游浏览器

6397:Character Encoding

题目描述
In computer science, a character is a letter, a digit, a punctuation mark or some other similar symbol. Since computers can only process numbers, number codes are used to represent characters, which is known as character encoding. A character encoding system establishes a bijection between the elements of an alphabet of a certain size $n$ and integers from $0$ to $n-1$. Some well known character encoding systems include American Standard Code for Information Interchange (ASCII), which has an alphabet size 128, and the extended ASCII, which has an alphabet size 256.

For example, in ASCII encoding system, the word $\texttt{wdy}$ is encoded as [119, 100, 121], while $\texttt{jsw}$ is encoded as [106, 115, 119]. It can be noticed that both $119+100+121=340$ and $106+115+119=340$, thus the sum of the encoded numbers of the two words are equal. In fact, there are in all 903 such words of length 3 in an encoding system of alphabet size 128 (in this example, ASCII). The problem is as follows: given an encoding system of alphabet size $n$ where each character is encoded as a number between 0 and $n-1$ inclusive, how many different words of length $m$ are there, such that the sum of the encoded numbers of all characters is equal to $k$?

Since the answer may be large, you only need to output it modulo 998244353.
输入解释
The first line of input is a single integer $T$ $(1 \leq T \leq 400)$, the number of test cases.

Each test case includes a line of three integers $n, m, k$ $(1 \leq n,m \leq 10^5, 0 \leq k \leq 10^5)$, denoting the size of the alphabet of the encoding system, the length of the word, and the required sum of the encoded numbers of all characters, respectively.

It is guaranteed that the sum of $n$, the sum of $m$ and the sum of $k$ don't exceed $5 \times 10^6$, respectively.
输出解释
For each test case, display the answer modulo 998244353 in a single line.
输入样例
4
2 3 3
2 3 4
3 3 3
128 3 340
输出样例
1
0
7
903
来自杭电HDUOJ的附加信息
Recommend chendu

该题目是Virtual Judge题目,来自 杭电HDUOJ

源链接: HDU-6397

最后修改于 2020-10-25T23:30:58+00:00 由爬虫自动更新

共提交 0

通过率 --%
时间上限 内存上限
2000/1000MS(Java/Others) 131072/131072K(Java/Others)