#C11051. Longest Continuous Increasing Sales Sequence

    ID: 40325 Type: Default 1000ms 256MiB

Longest Continuous Increasing Sales Sequence

Longest Continuous Increasing Sales Sequence

You are given daily sales data represented as a sequence of integers. Your task is to determine the length of the longest continuous subsequence in which each element is strictly greater than its previous element.

More formally, given a sequence \(S = [s_1, s_2, \dots, s_n]\), find the maximum length \(L\) for which there exists an index \(i\) such that \(s_{i+1} > s_i, s_{i+2} > s_{i+1}, \dots, s_{i+L-1} > s_{i+L-2}\). If the sequence is empty, the answer is 0.

Note: This is not the general longest increasing subsequence problem; the subsequence here must consist of consecutive elements from the original sequence.

inputFormat

The first line of the input contains a single integer \(n\) (\(n \geq 0\)), representing the number of sales records. The second line contains \(n\) integers separated by spaces representing the sales data.

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

outputFormat

Output a single integer representing the length of the longest continuous strictly increasing sequence from the provided sales data.

## sample
8
100 200 90 120 150 180 110 130
4