長さ N の正整数列 A=(A 1 , A 2 , ..., A N ) が与えられる.正整数列 A の連続部分列の中で昇順に並んでいるもののうち,最長のものの長さを求めよ.
すなわち, A l ≦ A l+1 ≦ ... ≦ A r を満たすような 2 つの整数 l, r ( 1 ≦ l ≦ r ≦ N ) について, r-l+1 の最大値を求めよ.
Input
入力は以下の形式で標準入力から与えられる.
N
A 1 A 2 ... A N
Output
正整数列 A の連続部分列の中で昇順に並んでいるもののうち,最長のものの長さを 1 行で出力せよ.
Constraints
1 ≦ N ≦ 100 .
1 ≦ A i ≦ 2020 ( 1 ≦ i ≦ N ).
Example 1
Input
10 3 1 4 1 5 9 2 6 5 3
Output
3
Example 2
Input
10 9 8 7 6 5 5 4 3 2 1
Output
2
Example 3
Input
9 1 2 2 12 120 210 202 1010 2020
Output
6
Discussion
Threads about this problem. Spoilers are collapsed; wrap hints in
||double bars||.No discussion yet. Start a thread if something here needs explaining.