CCF-CSP-2016-09-1最大波动
作者:互联网
链接:http://118.190.20.162/view.page?gpid=T47
代码:
#include<bits/stdc++.h>
using namespace std;
int main (){
int n,num,ans=0;
vector<int>ve;
cin>>n;
for(int i=0;i<n;i++){
cin>>num;
ve.push_back(num);
}
for(int i=1;i<n;i++){
ans=max(ans,abs(ve[i]-ve[i-1]));
}
cout<<ans;
return 0;
}
标签:CCF,ve,int,09,118.190,gpid,num,vectorve,2016 来源: https://www.cnblogs.com/abestxun/p/14615759.html