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$

Discussions

About Discussions

The discussion section is only for posting: Editorials, General Discussions (problem-solving strategies, alternative approaches), and Off-topic conversations.

This is NOT for reporting issues! If you want to report bugs or errors, please use the Issues section below.

Open Discussions 0
No discussions in this category.

Issues

About Issues

If you find any issues with the problem (statement, scoring, time/memory limits, test cases, etc.), you may submit an issue here. A problem moderator will review your issue.

Guidelines:

  1. This is not a place to publish discussions, editorials, or requests to debug your code. Issues are only visible to you and problem moderators.
  2. Do not submit duplicated issues. Submitting multiple issues may cause your account to be banned.
  3. Issues must be filed in English or Chinese only.
Active Issues 0
No issues in this category.
Closed/Resolved Issues 0
No issues in this category.