46分,求dalao帮

P1567 统计天数

@[02Ljh](/user/578004) 最后如果还在上升的话需要特判一下
by RockyYue @ 2022-02-17 13:08:48


@[RockyYue_](/user/308106) 谢谢大佬
by 02Ljh @ 2022-02-17 13:29:42


#11又卡了 求dalao来看本蒟蒻的代码 ```cpp #include <bits/stdc++.h> using namespace std; int main() { int n,maxn=0,tim=0; int w[100001]; cin>>n; for(int i=0;i<n;i++) { cin>>w[i]; } for(int i=0;i<n;i++) { if(w[i]<w[i+1]&&(i+1)!=n) tim++; else if(i+1==n) tim++; else if(w[i]>=w[i+1]||i+1==n) { maxn=max(maxn,tim); tim=0; } } cout<<maxn+1; return 0; } ``` QAQ
by 02Ljh @ 2022-02-17 13:35:34


@[02Ljh](/user/578004) sorry现在才看见qwq
by RockyYue @ 2022-02-17 14:00:55


你已经AC了,真棒!
by RockyYue @ 2022-02-17 14:01:56


@[02Ljh](/user/578004) 谢谢大佬 %%%
by 02Ljh @ 2022-02-17 15:58:32


|