| acmsguru |
|---|
| Finished |
if at < at+1 for any i ≤ t < j and at > at+1 for any j ≤ t < k. In this case we call
the
of the hill. Similarly, we call the continuous subsequence a
if at > at+1 for any i ≤ t < j and at < at+1 for any j ≤ t < k. In this case we call
the
of the dale.
), the number of test cases. The test cases follow, occupying two lines each. The first of the two lines contains N (
), the second the members of the sequence, separated by spaces. The sum of values of N over all test cases in the file does not exceed
. The absolute values of the members of the sequences do not exceed
. sample input | sample output |
2 10 4 4 1 6 3 2 1 2 5 7 10 2 3 4 5 6 7 8 9 10 9 | 1 3 1 0 |
| Name |
|---|


