问题1550--Redraiment的走法

1550: Redraiment的走法

时间限制: 1 Sec  内存限制: 64 MB
提交: 1  解决: 1
[提交] [状态] [讨论版] [命题人:]

题目描述

Redraiment是个聪明人,总是以奇怪的思考方法思考问题,但不知道为什么,他的解答总是最最巧妙,我们隆重地称他为诡异人! 有一天Jesse不经意中发现,诡异人的走路方法很特别,于是特别关注了他的走路规则。他发现诡异人总是往高处走,但走的步数总是最多,不知道为什么?你能替Jesse研究研究他最多走的步数吗? 发现了你也会是个聪明人!^_^

输入

There has several test cases. Each case start with an integer n(0 < n ≤10000), then follows n lines.Each line has an integer h( 1 ≤ h ≤ 100),which represents the height of the place.

输出

For each case output a line with the max number of the steps he can go .

样例输入

5
1 2 3 4 5
6
2 5 1 5 4 5

样例输出

5
3

提示

Example: 6个点的高度各为 2 5 1 5 4 5 如从第1格开始走,最多为3步, 2 4 5 从第2格开始走,最多只有1步,5 而从第3格开始走最多有3步,1 4 5 从第5格开始走最多有2步,4 5

来源/分类


[提交] [状态]