P1567 Counting Days
Description
On a hot summer day, KC is very uncomfortable. He would rather endure the cold of the Arctic than the summer in Xiamen. Recently, he started studying weather changes. He hopes to use the results of his research to predict future weather.
After much effort, he collected the highest temperatures for $N(1 \leq N \leq 10^6)$ consecutive days.
Now he wants to know the length of the longest consecutive period during which the maximum temperature is strictly increasing.
Input Format
Line 1: an integer $N$. $1 \leq N \leq 10^6$.
Line 2: $N$ space-separated integers, representing the maximum temperatures for $N$ consecutive days. $0 \leq$ maximum temperature $\leq 10^9$.
Output Format
1 line: an integer, the length of the longest consecutive period during which the maximum temperature is strictly increasing.
Explanation/Hint
Translated by ChatGPT 5