#C13498. Longest Contiguous Increasing Subarray

    ID: 43042 Type: Default 1000ms 256MiB

Longest Contiguous Increasing Subarray

Longest Contiguous Increasing Subarray

Given an array of integers, your task is to find the length \(L\) of the longest contiguous subarray in which each consecutive element is strictly greater than its previous one.

Formally, given an array \(A\) of length \(n\), determine the maximum length \(L\) for which there exists an index \(i\) (0-based) satisfying:

[ A[i] < A[i+1] < \cdots < A[i+L-1] ]

If the array is empty, output 0.

Note: A contiguous subarray consists of consecutive elements from the original array.

inputFormat

The input is read from standard input (stdin) and has the following format:

n
a1 a2 a3 ... an

Here, n (an integer) represents the number of elements in the array, and a1 a2 ... an are the space-separated integers representing the array. If n = 0, the array is empty.

outputFormat

The output is a single integer written to standard output (stdout) — the length of the longest contiguous subarray that is strictly increasing.

## sample
9
1 3 5 4 7 6 8 10 12
4