题目描述
Problem Description
Given a polynomial $A(x)$ of degree $n-1$, find a polynomial $F(x)$ under $\bmod{\:x^n}$ such that $F(x)\equiv\text{asin}\:A(x)$ or $F(x)\equiv\text{atan}\:A(x)$.
All operations are performed under $\bmod\ 998244353$.
Input Format
The first line contains two integers $n$ and $type$. If $type=0$, it means to find $\text{asin}$, and if $type=1$, it means to find $\text{atan}$.
The second line contains $n$ integers, representing the coefficients of the polynomial $a_0, a_1, \cdots, a_{n-1}$ in order.
It is guaranteed that $a_0=0$.
Output Format
Output one line containing $n$ integers, representing the coefficients of the resulting polynomial $f_0, f_1, \cdots, f_{n-1}$.
Sample Input and Output
Sample Input #1
8 0
0 4 2 6 1 5 3 7
Sample Output #1
0 4 2 665496252 17 399297879 332748370 570426983
Sample Input #2
8 1
0 4 2 6 1 5 3 7
Sample Output #2
0 4 2 665496220 998244322 399297839 332748518 570424795
Notes/Hints
For $100\%$ of the data: $n\leq10^5$, $a_i\in[0,998244352]\cap\mathbb{Z}$.
The first $5$ points have $type=0$, and the last $5$ points have $type=1$.
输入格式
见题面 Input 部分
输出格式
见题面 Output 部分