B. Orange Pit
time limit per test
1 second
memory limit per test
256 megabytes
input
standard input
output
standard output

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.

Input

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$$$.

Output

For each test case, print the maximum number of points Busy Beaver can score.

Example
Input
3
3
1 6 3
1
4
5
1 500000000 500000000 500000000 1000000000
Output
8
0
2499999999
Note

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.