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

建议使用的浏览器:

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

7243:The Alchemist of the Discrete Mathematics

题目描述
As a great alchemist, Sophie learns Discrete Mathematics very well.

One day, Sophie finds a magic prime number $p$. From her grandma's teaching, if a polynomial $F(x)$ satisfying that $F(x) \equiv 0 \pmod p$ has a solution, then the polynomial is mysterious.

To understand the property of mysterious polynomials, Sophie studies the roots of polynomial.

Given integer $n$, prime number $p$ and parameter $c \in \mathbb{F}_p$, the set $S \subseteq \mathbb{F}_p$ is good, if there exist polynomial $f(x),g(x) \in \mathbb{F}_p[x]$ satisfying
<ol>
<li> $\mathrm{deg}(f) = n$ </li>
<li> $g(x)\mid f(x)$, i.e., $g(x)$ divides $f(x)$ </li>
<li> Call $T$ the set of roots of polynomial $h(x) = f(x)g(c \cdot x)$, then $S = T\;\cap \mathbb{F}_p$ </li>
</ol>

Sophie wonders the number of good sets given $n,p$ and $c$. Since the answer may be too large, you should output the answer modulo $998244353$.

If you are not familiar with those notations, please refer to the ``Notes section'' in the pdf statement for formal definition.

输入解释
The first line contains an integer $T(T\geq 1)$, denoting the number of test cases.

For each test case, there is a line containing three integers $p, c, n(1 \leq c \lt p \leq 5*10^5, 0 \leq n \leq 10^6)$, whose meaning is already given in the previous statement.

It is guaranteed that the sum of $p$ over all test cases won't exceed $10^7$.
输出解释
For each test case, output an integer in a line, denoting the answer taken modulo $998244353$.
输入样例
2
3 2 2
5 4 2
输出样例
8
23

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

源链接: HDU-7243

最后修改于 2022-09-15T06:17:35+00:00 由爬虫自动更新

共提交 0

通过率 --%
时间上限 内存上限
16000/8000MS(Java/Others) 524288/524288K(Java/Others)