Milly is playing with an array A of size N. She is trying to find those non-empty subarrays (sequence of consecutive elements) whose maximum and minimum values are identical. Milly got confused while counting. Your task is to help her in this problem.
- First line of the input will contain T denoting the number of test-cases.
- For every test case, first line will contain N. Next line will contain N space separated integers denoting Ai.
- For every test case, print the required answer in a separate line.
- 1 ≤ T ≤ 10
- 1 ≤ N ≤ 105
- 1 ≤ |Ai| ≤ 109
Here, || denotes the absolute value.
Test case 1:
Special subarrays for the given sample case include :- , , , [1, 1].
for each input file.
Marks are awarded when all the testcases pass.