| TheForces Round #27(3^3-Forces) |
|---|
| Finished |
Han hasn't eaten since 2 months ago. She had planned to eat some salmon in George's house.
George has $$$n$$$ boxes where there are $$$a_i$$$ salmons in every box $$$1 \leq i \leq n$$$.Initially,Han's score is $$$0$$$ and she starts by standing in front of box $$$1$$$.She's trying to eat all of George's salmons with the procedure as below:
She wants to know, for each index $$$i$$$ from $$$1$$$ to $$$n$$$, what is her score as soon as there is no salmon in box $$$i$$$?
The first line contains a single integer $$$t$$$ $$$(1 \leq t \leq 10^4) $$$ — the number of test cases. Descriptions of the test cases follow.
The first line of each test case contains a single integer $$$n$$$ $$$(1 \leq n \leq 2 \times 10^5)$$$, the number of boxes.
The second line of each test case contains $$$n$$$ integers $$$a_1, a_2, ..., a_n$$$ $$$(1 \leq a_i \leq 10^9)$$$ — the number of salmons in each box.
The sum of $$$n$$$ over all test cases does not exceed $$$2 \times 10^5$$$.
For each test case, print $$$n$$$ integers — the answer for each index $$$i$$$ $$$(1 \leq i \leq n)$$$.
342 1 4 345 3 2 152 5 7 4 6
5 2 10 9 11 9 7 4 6 19 24 17 23
| Name |
|---|


