15 lines
302 B
C++
15 lines
302 B
C++
#include <bits/stdc++.h>
|
|
using namespace std;
|
|
const int N = 10010;
|
|
int n, mx, pre, nxt;
|
|
|
|
int main() {
|
|
cin >> n >> pre;
|
|
for (int i = 2; i <= n; i++) {
|
|
cin >> nxt;
|
|
if (abs(nxt - pre) > mx) mx = abs(nxt - pre);
|
|
pre = nxt;
|
|
}
|
|
cout << mx;
|
|
return 0;
|
|
} |