Sam is playing with an array, , of positive integers. Sam writes a list, , containing all 's contiguous subarrays, and then replaces each subarray with its respective maximum element.
For example, consider the following where :
Subarrays of :
Updated (Maximum) Subarrays:
Help Sam determine how many numbers in are greater than .
Input Format
The first line contains a single integer, (the number of test cases). Each test case is described over two lines:
The first line of each test case contains two space-separated integers, (the number of elements in array ) and , respectively.
The second line of each test case contains space-separated integers describing the elements in .
Constraints
.
Output Format
For each test case, print the number of in on a new line.
Sample Input
2
3 2
1 2 3
3 1
1 2 3
Sample Output
3
5
Explanation
Both test cases use the same as described in the Problem Statement, so for both test cases.
Test Case 0:
has elements , so we print .
Test Case 1:
has elements , so we print .