链接: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;
}