P6613 First-Order Differential Equation.
Background
In the problem, the expression on the right side of $F'(x)$ can be replaced by others. Here it is fixed for easier testing.
Description
Given polynomials $F(x)$, $A(x)$, and $B(x)$ satisfying:
$$\frac{\text dF(x)}{\text dx} \equiv A(x)\text e^{F(x)-1}+B(x) \pmod{x^n}$$
and $F(0)=1$.
Given $A(x)$ and $B(x)$, find the coefficients of the first $n$ terms of $F(x)$.
Output the answer modulo $998244353$.
Input Format
The first line contains a positive integer $n$, representing the degree of $A(x)$ and $B(x)$.
The second line contains $n+1$ integers, from low degree to high degree, representing the coefficients of $A(x)$.
The third line contains $n+1$ integers, from low degree to high degree, representing the coefficients of $B(x)$.
Output Format
Output one line with $n+1$ integers, from low degree to high degree, representing the coefficients of $F(x)$.
Explanation/Hint
### Constraints
For $30\%$ of the testdata, $1 \le n \le 5000$.
For $100\%$ of the testdata, $1 \le n \le 10^5$.
All inputs are guaranteed to be in the range $[0,998244353)$.
Translated by ChatGPT 5