QOJ.ac

QOJ

Time Limit: 2.5 s Memory Limit: 1024 MB Total points: 100 Hackable ✓
Statistics

题目描述

给定多项式 $A(z)=\sum^{n-1}_{i=0} a_ix^i$,求 $\exp A(z) \bmod {z^n} = \sum^{n-1}_{i=0} c_iz^i$

输入格式

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

接下来一行,包含 $n$ 个整数 $a_0,a_1,\cdots,a_{n-1}$。保证 $a_0=0$。

输出格式

输出一行 $n$ 个整数,表示 $c_0,c_1,\cdots,c_{n-1}$,取模 998244353。

样例数据

样例输入

6
0 1 2 3 4 5

样例输出

1 1 499122179 166374064 291154613 690452363

子任务

对于所有数据,$1 \leq n \leq 10^6$,$0 \le a_i < 998\,244\,353$,$a_0 = 0$。

子任务 $n \le$ 分值
$1$ $100$ 10
$2$ $5 \cdot 10^3$ 10
$3$ $3 \cdot 10^4$ 10
$4$ $10^5$ 10
$5$ $1.5 \cdot 10^5$ 10
$6$ $2 \cdot 10^5$ 10
$7$ $3 \cdot 10^5$ 10
$8$ $5 \cdot 10^5$ 10
$9$ $7 \cdot 10^5$ 10
$10$ $10^6$ 10

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.