There are $$$n$$$ crystals numbered $$$1$$$ through $$$n$$$ from left to right. Crystal $$$i$$$ initially contains $$$a_i$$$ units of energy. You may collect all $$$n$$$ crystals in any order.
When you collect crystal $$$i$$$:
The crystals' numbers do not change as you collect them.
What is the maximum total score after collecting all $$$n$$$ crystals?
The first line contains an integer $$$T$$$ ($$$1 \le T \le 10^4$$$), the number of test cases.
The first line of each test case contains an integer $$$n$$$ ($$$1 \le n \le 2 \times 10^5$$$), the number of crystals.
The second line contains $$$n$$$ integers $$$a_1,a_2,\ldots,a_n$$$ ($$$-10^9 \le a_i \le 10^9$$$), their initial energies.
The sum of $$$n$$$ over all test cases does not exceed $$$2 \times 10^5$$$.
For each test case, output one integer: the maximum possible total score.
251 2 3 4 599 -9 8 -2 4 -4 3 -5 3
15 47
Sample 1 Explanation
In the first test case, collecting crystals in the order $$$3 \to 5 \to 1 \to 2 \to 4$$$ gives a score of $$$15$$$. This is optimal.