AtCoder Beginner Contest 139
C
Lower
AtCoder
⌀ 13
原题
← BD →
翻译中…

Problem Statement

翻译中…

There are $N$ squares arranged in a row from left to right.

翻译中…

The height of the $i$-th square from the left is $H_i$.

翻译中…

You will land on a square of your choice, then repeat moving to the adjacent square on the right as long as the height of the next square is not greater than that of the current square.

翻译中…

Find the maximum number of times you can move.

翻译中…

Constraints

翻译中…
  • All values in input are integers.
  • $1 \leq N \leq 10^5$
  • $1 \leq H_i \leq 10^9$
翻译中…

Input

翻译中…

Input is given from Standard Input in the following format:

翻译中…

N
H_1 H_2 ... H_N

翻译中…

Output

翻译中…

Print the maximum number of times you can move.

翻译中…

样例

Input #1
5
10 4 8 7 3
Output #1
2
By landing on the third square from the left, you can move to the right twice.
Input #2
7
4 4 5 6 6 5 5
Output #2
3
By landing on the fourth square from the left, you can move to the right three times.
Input #3
4
1 2 3 4
Output #3
0
题目信息
题号
abc139_c
时间限制
2 s
内存限制
1024 MB

题面与样例版权归 AtCoder 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。