A : mountain
Score : 100
Diff : 0
Comment :
EZ. Without array.
(Code : )
#include
using namespace std;
int main() {
freopen("mountain.in", "r", stdin);
freopen("mountain.out", "w", stdout);
int _;cin >> _;
int s, t, cv=0;cin >> s;
while (cin >> t) {
cv = max(cv, abs(t-s));
s=t;
}
cout << cv;
return 0;
}