Given an array $$$A_1, A_2, \ldots A_N$$$ of $$$N$$$ integers. Solve the following problem for every $$$M$$$ ($$$1 \leq M \leq N$$$):
The first line contains one integer $$$N \ (1 \leq N \leq 10^6)$$$. The second line consists of $$$N$$$ space-separated integers $$$A_1, A_2, \ldots, A_N$$$ ($$$0 \leq A_i \leq 10^6$$$).
Print one line consisting of $$$N$$$ integers. The $$$i$$$-th integer is the answer for the problem with $$$M=i$$$.
60 3 10 2 4 5
10 10 11 11 11 15
40 1 0 1
0 0 1 1
| Название |
|---|


