An array of integers is given. A segment of the array is a group of consecutive elements. A segment is increasing if every element in it is strictly smaller than the one after it, and it has at least two elements. Your task is to count the increasing segments of the given array.
Formally, you are counting the pairs of positions , , for which .
Input
The first line contains a single integer - the number of testcases.
- The first line of each testcase contains an integer - the number of elements.
- The next line contains integers - the elements of the array.
Output
For every testcase print a single line with the number of increasing segments.
Example
2 5 1 3 4 -2 10 4 2 2 3 1
4 1
In the first testcase the increasing segments are , , and . In the second testcase the only one is - the pair of equal elements does not count, the increase must be strict.
Constraints
This problem was adapted, with permission, from Broj rastućih segmenata, authored by Društvo matematičara Srbije and Fondacija Petlja.