#K81077. Longest Continuous Uphill Path

    ID: 35673 Type: Default 1000ms 256MiB

Longest Continuous Uphill Path

Longest Continuous Uphill Path

Given an array of integer elevations, your task is to compute the length of the longest continuous uphill path. A continuous uphill path is defined as a contiguous subarray where each subsequent element is strictly greater than its previous element. In other words, for a subarray A[i..j] (with 1 ≤ i < j ≤ N), it is an uphill path if for every k with i ≤ k < j, the condition \(A_{k} < A_{k+1}\) holds. If the array is empty, consider the longest uphill path length to be 0.

Input/Output Method: All inputs are to be read from standard input (stdin) and all outputs should be written to standard output (stdout).

Note: There may be multiple test cases.

inputFormat

The first line of input contains an integer \(T\) (the number of test cases). Then, for each test case, the input is structured as follows:

  • The first integer \(N\) represents the number of elevation points.
  • Then \(N\) space-separated integers follow representing the elevation values.

For example: 5\n5 1 2 2 4 3\n6 3 4 5 1 2 3 represents 2 test cases; the first case has 5 elevations and the second has 6 elevations.

outputFormat

For each test case, output a single integer on a new line representing the length of the longest continuous uphill path.

## sample
5
5 1 2 2 4 3
6 3 4 5 1 2 3
7 1 1 1 1 1 1 1
5 5 4 3 2 1
4 1 3 5 7
2

3 1 1 4

</p>