#C2764. Longest Increasing Subarray

    ID: 46116 Type: Default 1000ms 256MiB

Longest Increasing Subarray

Longest Increasing Subarray

You are given a list of integer checkpoints representing the sequence of checkpoints on a marathon route. Your task is to find the length of the longest contiguous subarray in which the elements are in strictly increasing order.

Formally, given an array \(A = [a_1, a_2, \dots, a_n]\), you need to find the maximum length \(L\) such that there exists an index \(i\) with \(1 \le i \le n - L + 1\) where \(a_i < a_{i+1} < \cdots < a_{i+L-1}\). If the array is empty, the answer is 0.

It is guaranteed that the input is provided through standard input (stdin) and the result should be printed to standard output (stdout).

inputFormat

The first line of input contains an integer \(n\) representing the number of checkpoints. If \(n > 0\), the second line contains \(n\) space-separated integers representing the checkpoints in order. If \(n = 0\), the second line will be absent.

outputFormat

Output a single integer on a new line, which is the length of the longest strictly increasing contiguous subarray.

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