func_code_string: #include <bits/stdc++.h>   using namespace std;   const int mod = 1e9 + 7;   const double eps = 1e-4;   const long long INF = 0x3f3f3f3f3f3f3f3f;   const int inf = 0x3f3f3f3f;   const int maxn = 1e5 + 7;   const int maxm = 1e6 + 7;   const double pi = acos(-1.0);   long long a[maxn];   long long b[maxn], c[maxn];   int main() {     int n;     scanf( %d , &n);     ;     for (int i = 1; i <= n; i++) scanf( %lld , &a[i]);     for (int i = 1; i < n; i++) {       int tmp = a[i] - a[i + 1];       if (tmp < 0) tmp = -tmp;       if (i % 2 == 1) {         b[i] = tmp;         c[i] = -tmp;       } else {         b[i] = -tmp;         c[i] = tmp;       }     }     long long sum = 0;     long long mx1 = -1, mx2 = -1;     for (int i = 1; i < n; i++) {       sum += b[i];       mx1 = max(mx1, sum);       if (sum < 0) {         sum = 0;         if (i % 2 == 1) i--;       }     }     sum = 0;     for (int i = 2; i < n; i++) {       sum += c[i];       mx2 = max(mx2, sum);       if (sum < 0) {         sum = 0;         if (i % 2 == 0) i--;       }     }     cout << max(mx1, mx2) << endl;     return 0;   }   