#K34737. Longest Increasing Temperature Sequence

    ID: 25376 Type: Default 1000ms 256MiB

Longest Increasing Temperature Sequence

Longest Increasing Temperature Sequence

Given a series of daily temperature measurements, your task is to find the length of the longest contiguous subsequence where the temperatures are strictly increasing. Formally, given an integer \(n\) and a sequence \(T = [t_1, t_2, \dots, t_n]\), you are to determine the maximum integer \(L\) such that there exists an index \(i\) where \(t_i < t_{i+1} < \dots < t_{i+L-1}\). This problem requires reading input from stdin and producing the result to stdout.

inputFormat

The input consists of two lines:

  1. The first line contains a single integer \(n\) representing the number of days.
  2. The second line contains \(n\) space-separated integers representing the temperatures for each day.

outputFormat

Output a single integer representing the length of the longest contiguous subsequence of days with strictly increasing temperatures.

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