Problem: You are given points with integer coordinates , which lie on a number line.
For some integer , we construct segments [], [], , []. Note that if , then the segment will look like []. The segment [] covers all integer points .
We define the power of a point as the number of segments that intersect the point with coordinate , denoted as .
Your task is to compute for each , i.e., the sum of for all integer points from to .
For example, if the initial coordinates are and we choose , then the segments will be: ,,,,. And the powers of the points will be: . Their sum is .
Input Format: The first line contains an integer () — the number of test cases.
The first line of each test case contains an integer () — the number of points.
The second line contains integers () — the coordinates of the points.
It is guaranteed that the sum of the values of over all test cases does not exceed .
Output Format: For each test case, output integers, where the -th integer is equal to the sum of the powers of all points for .
Note: In the first test case we first choose , then the following segments are formed: ,,.
The powers of the points will be as follows: The sum of powers of the points: .
After that we choose . Then there will be such segments: ,,, and powers of the points are .
At the end we take and the segments look like this: ,,, the powers of the points are .