There are
Find the number of such possible coordinates where teams can be divided.
Note: Non-integral coordinates do not exist.
Input format
- The first line contains an integer
denoting the number of test cases. - For each test case:
- The first line contains an integer
denoting the number of players. - The second line contains an array of space-separated integers denoting array
.
- The first line contains an integer
Output format
Print a single line for each test case, denoting the number of coordinates
Constraints
Here,
The sum of
2 4 3 -3 1 -2 2 2 2
4 1
First test case:
All the players are indicated by an line below the number, all the points which colored black above the number line is suitable for the team division, but we need to consider the only integer co-ordinates, so there are 4 {-2,-1,0,1}.
Note that while considering -2, we can decide which side we want to keep player at -2 and for division we will consider him on left.
Second test case:
Both the players are at 2, so the point we can choose is 2, we can decide to keep one player on left and one player on the right.
Please login to use the editor
You need to be logged in to access the code editor
Login to unlock the editorial
Please login to use the editor
You need to be logged in to access the code editor