2222.Maximum Increase

Time Limit: 1s Memory Limit: 256MB

You are given array consisting of n integers. Your task is to find the maximum length of an increasing subarray of the given array.

A subarray is the sequence of consecutive elements of the array. Subarray is called increasing if each element of this subarray strictly greater than previous.

Input Format(From the terminal/stdin)

The first line contains single positive integer n (1 \le n \le 105) - the number of integers.

The second line contains n positive integers a1,a2,...,an (1 \le ai \le 109).

Output Format(To the terminal/stdout)

Print the maximum length of an increasing subarray of the given array.

Sample Input 1

Copy
5
1 7 2 11 15
 \n
 · · ·  ·  \n

Sample Output 1

Copy
3
 \n

Sample Input 2

Copy
6
100 100 100 100 100 100
 \n
   ·   ·   ·   ·   ·   \n

Sample Output 2

Copy
1
 \n

Sample Input 3

Copy
3
1 2 3
 \n
 · · \n

Sample Output 3

Copy
3
 \n

Submit

请先 登录

© 2025 FAQs