#C11846. Longest Increasing Contiguous Subsequence

    ID: 41207 Type: Default 1000ms 256MiB

Longest Increasing Contiguous Subsequence

Longest Increasing Contiguous Subsequence

You are given an array of integers. Your task is to find the length of the longest contiguous subsequence in which each element is strictly greater than its previous one.

More formally, for an array \(a_1, a_2, \ldots, a_n\), find the maximum length \(L\) such that there exists an index \(i\) where \(a_i < a_{i+1} < \cdots < a_{i+L-1}\). Use the notation \(\max\{L\}\) to denote this maximum length.

inputFormat

The first line contains an integer \(n\) representing the number of elements in the array. The second line contains \(n\) space-separated integers.

If \(n = 0\), the second line will be empty.

outputFormat

Output a single integer representing the length of the longest contiguous increasing subsequence.

## sample
8
1 2 3 2 3 4 5 1
4