80分求助

P1317 低洼地

你这个方法可能不行
by momentous @ 2019-06-03 09:00:04


或者你去重的方法不行
by momentous @ 2019-06-03 09:01:01


``` #include<cstdio> #include<queue> #include<algorithm> using namespace std; int n,Ans; int a[100000]; int main() { scanf("%d",&n); for(int i=1;i<=n;++i) { scanf("%d",&a[i]); if(a[i]==a[i-1]) { --i; --n; } } for(int i=2;i<n;++i) { if(a[i]<a[i-1] && a[i]<a[i+1]) ++Ans; } printf("%d",Ans); return 0; } ```
by momentous @ 2019-06-03 09:03:32


https://www.luogu.org/recordnew/show/19589355
by momentous @ 2019-06-03 09:03:52


@[Donaghy](/space/show?uid=203762)
by momentous @ 2019-06-03 09:04:02


您都做了9道黑题了,却连一道红题也不会,太巨了 @[Donaghy](/space/show?uid=203762)
by momentous @ 2019-06-03 09:06:31


@[lyslys](/space/show?uid=42714) 谢谢dalao 果然是去重的问题(^-^)
by Donaghy @ 2019-06-03 09:07:41


@[lyslys](/space/show?uid=42714) 不好意思,被我们队长机惨过的(哭)
by Donaghy @ 2019-06-03 09:08:21


我们机房一个人每天被机惨......
by momentous @ 2019-06-03 09:09:09


@[lyslys](/space/show?uid=42714) 同一个机房的,我他组长,亲眼看见队长干坏事.... ,主要队长手速还贼恐怖,三分钟九道就弄完了,我们都还没反应过来
by foxdemon @ 2019-06-03 09:09:56


| 下一页