#C9588. Longest Increasing Contiguous Subarray

    ID: 53697 Type: Default 1000ms 256MiB

Longest Increasing Contiguous Subarray

Longest Increasing Contiguous Subarray

You are given a sequence of daily temperature readings. Your task is to find the length of the longest contiguous subarray where the readings are strictly increasing. That is, find the maximum integer (L) such that there exists an index (i) with (a_i, a_{i+1}, \dots, a_{i+L-1}) satisfying (a_j < a_{j+1}) for all valid indices (j). This problem helps in analyzing trends in temperature data over days.

inputFormat

The first line of input contains an integer (n) representing the number of temperature readings. The second line contains (n) space-separated integers representing the daily temperatures. Note that (n) can be zero.

outputFormat

Output a single integer: the length of the longest contiguous subarray with strictly increasing temperature readings.## sample

10
1 2 3 2 3 4 5 1 2 3
4