#K76407. Longest Strictly Increasing Subarray
Longest Strictly Increasing Subarray
Longest Strictly Increasing Subarray
Given an array of integers, your task is to find the length of the longest strictly increasing contiguous subarray. In other words, you need to find the maximum length of a subsequence of consecutive elements such that each element is greater than its previous element.
Note: The subarray must be contiguous, meaning the elements must be next to each other in the original array.
For example, for the array \( [1, 3, 5, 4, 7] \), the longest strictly increasing contiguous subarray is \( [1, 3, 5] \) with a length of \( 3 \). If the array contains all identical elements, then the answer will be \( 1 \), and if the array is empty, the answer should be \( 0 \).
Input/Output: Read the input from stdin and print the output to stdout.
inputFormat
The first line contains an integer \( n \) representing the number of elements in the array.
The second line contains \( n \) integers separated by spaces representing the elements of the array.
outputFormat
Output a single integer: the length of the longest strictly increasing contiguous subarray.
## sample5
1 3 5 4 7
3
</p>