P5265 Polynomial Inverse Trigonometric Functions
Description
Given an $(n - 1)$-degree polynomial $A(x)$, find a polynomial $F(x)$ modulo $x^n$ such that $F(x)\equiv\text{asin}\:A(x)$ or $F(x)\equiv\text{atan}\:A(x)$.
All operations are performed modulo $998244353$.
Input Format
The first line contains **two** integers $n,type$. If $type=0$, compute $\text{asin}$; if $type=1$, compute $\text{atan}$.
The second line contains $n$ integers, representing the coefficients $a_0,a_1,\cdots,a_{n-1}$ of the polynomial in order.
It is guaranteed that $a_0=0$.
Output Format
Output one line with $n$ integers, representing the coefficients $f_0,f_1,\cdots,f_{n-1}$ of the answer polynomial.
Explanation/Hint
For $100\%$ of the testdata: $n\leq10^5$, $a_i\in[0,998244352]\cap\mathbb{Z}$.
For the first $5$ points, $type=0$; for the last $5$ points, $type=1$.
Translated by ChatGPT 5