蒟蒻 Python 除了前三个后面全超时,求dalao帮助

P1567 统计天数

```python n, t = int(input()), list(map(int, input().split(' '))) x,y,ans=0,1,1 while(y<n): while(y<n and t[y] > t[y-1]): #上升就一直往后跑,直到不上升 y=y+1 if ans<y-x: # 计算区间长度 ans=y-x x=y#获取新区建的起点 y=y+1#新区间重点自增一个 print(ans) ```
by yqw2486 @ 2020-02-26 21:51:06


@[yqw2486](/user/39079) 谢谢老师,懂了
by dsbzjy @ 2020-03-01 19:50:46


|