P10007 [Training Team Mutual Test 2023] Fairy Tale
Background
~~A fairy tale is only beautiful in truth, yet it is never continued.~~
A fairy tale is only beautiful in gentleness, yet it is never continued.
Description
Lingluo has recently been learning the prefix sum algorithm, and she wrote the following program:
```cpp
read(n),read(a);
for(int i=0;i
Input Format
The first line contains two positive integers $n,a$.
The next line contains $n+1$ non-negative integers, representing $f_0,f_1,\cdots,f_n$.
Output Format
Output $n$ non-negative integers, representing $\text{ans}_1,\text{ans}_2,\cdots,\text{ans}_n$.
Explanation/Hint
Constraints:
For $100\%$ of the testdata, it is guaranteed that $2\leqslant n\leqslant 10^6$, $0\leqslant f_i