#C4492. Maximum Consecutive Increasing Temperature Days

    ID: 48036 Type: Default 1000ms 256MiB

Maximum Consecutive Increasing Temperature Days

Maximum Consecutive Increasing Temperature Days

You are given a sequence of integer temperatures for consecutive days. Your task is to determine the maximum number of consecutive days during which the temperature increases. Formally, for a sequence of temperatures \(T_1, T_2, \dots, T_n\), you need to find the maximum length \(L\) such that for some index \(i\), \(T_{i+1} > T_{i}, T_{i+2} > T_{i+1}, \dots, T_{i+L} > T_{i+L-1}\). Note that the count \(L\) represents the number of increments (so it is one less than the number of days in such a subsequence).

Example: For the sequence [30, 31, 32, 33, 34], the answer is 4 because there are 4 consecutive increases (31>30, 32>31, 33>32, 34>33).

inputFormat

The input is given via stdin and has the following format:

  • The first line contains an integer \(n\), the number of days (0 \(\leq n\)).
  • The second line contains \(n\) space-separated integers representing the temperatures for each day.

outputFormat

Print a single integer to stdout representing the maximum number of consecutive days with an increase in temperature.

## sample
5
30 31 32 33 34
4

</p>