#include<iostream> #include<algorithm> using namespace std; int main(){ int n; cin>>n; int* a= new int[n]; cin>>a[0]; int max=0; int* b=new int[n];//存放與前一個數的差 for(int i=1;i<n;i++){ cin>>a[i]; b[i]=a[i]-a[i-1]; if(abs(b[i])>max) max=abs(b[i]); } cout<<max<<endl; delete[] a,b; return 0; }