Busy Beaver has filled a pit with $$$N$$$ labeled oranges. The $$$i$$$-th orange is labeled $$$a_i$$$.
Busy Beaver is playing a game with these oranges. They start with a score of $$$0$$$. Then, until there is only one orange left, Busy Beaver will select two oranges $$$i$$$ and $$$j$$$, gain $$$|a_i - a_j|$$$ points, discard one of these oranges, and return the other to the pit.
Find the maximum number of points Busy Beaver can score.
Each test contains multiple test cases. The first line contains a single integer $$$T$$$ ($$$1 \le T \le 10^4$$$) — the number of test cases. The description of the test cases follows.
The first line of each test case contains a single integer $$$N$$$ ($$$1 \le N \le 2\cdot 10^5$$$).
The second line of each test case contains $$$N$$$ integers $$$a_1, \dots, a_N$$$ ($$$1\le a_i\le 10^9$$$).
The sum of $$$N$$$ across all test cases does not exceed $$$2 \cdot 10^5$$$.
For each test case, print the maximum number of points Busy Beaver can score.
331 6 31451 500000000 500000000 500000000 1000000000
802499999999
For the first test case, Busy Beaver should first select oranges $$$2$$$ and $$$3$$$, obtain $$$|6-3|=3$$$ points, then discard orange $$$3$$$. Then, after selecting oranges $$$1$$$ and $$$2$$$, Busy Beaver obtains $$$|1-6|=5$$$ additional points, ending with $$$8$$$ points total. This is the maximum number of points Busy Beaver can score.