QOJ.ac

QOJ

Time Limit: 5 s Memory Limit: 2048 MB Total points: 10 Hackable ✓

#1098. 多项式复合逆

الإحصائيات

给定形式幂级数 $F(x) = \displaystyle \sum_{i=0}^{n-1} f_ix^i$,满足 $f_0 = 0, f_1 \ne 0$。你需要求 $G(x)$ 使得 $F(G(x)) \equiv x \pmod{x^n}$,并返回 $G$ 的各项系数对 $998\,244\,353$ 取模后的结果。

输入格式

输入的第一行包含一个整数 $N$。

接下来一行,包含 $N$ 个整数 $f_0, f_1, \cdots, f_{n-1}$。保证 $f_0 = 0, f_1 \ne 0$,且对每个 $i$ 有 $0 \leq f_i < 998\,244\,353$。

输出格式

输出一行,包含 $N$ 个整数 $g_0, g_1, \cdots, g_{n-1}$。

样例数据

样例输入

6
0 9 0 2 2 8

样例输出

0 443664157 0 842292446 315420128 301682335

子任务

对于所有的数据,我们有 $1 \leq N \leq 200\,000$。

子任务 $N \leq $
$1$ $10$
$2$ $1\,000$
$3$ $3\,000$
$4$ $5\,000$
$5$ $10\,000$
$6$ $25\,000$
$7$ $50\,000$
$8$ $100\,000$
$9$ $150\,000$
$10$ $200\,000$
About Issues

We understand that our problem archive is not perfect. If you find any issues with the problem, including the statement, scoring configuration, time/memory limits, test cases, etc.

You may use this form to submit an issue regarding the problem. A problem moderator will review your issue and proceed it properly.

STOP! Before you submit an issue, please READ the following guidelines:

  1. This is not a place to publish a discussion, editorial, or requests to debug your code. Your issue will only be visible by you and problem moderators. Other users will not be able to view or reply your issues.
  2. Do not submit duplicated issues. If you have already submitted one, please wait for an moderator to review it. Submitting multiple issues will not speed up the review process and might cause your account to be banned.
  3. Issues must be filed in English or Chinese only.
  4. Be sure your issue is related to this problem. If you need to submit an issue regarding another problem, contest, category, etc., you should submit it to the corresponding page.

Active Issues 0

No issues in this category.

Closed/Resolved Issues 0

No issues in this category.