func_code_string: #include <bits/stdc++.h>   using namespace std;   int n, s1, s2;   int a[100005];   bool check(int x) {     int l = -1e9, r = 1e9;     for (int i = n; i >= 1; i--) {       if (l <= a[i] && a[i] <= r) {         l = a[i] - x;         r = a[i] + x;       } else {         l = max(l, a[i] - x);         r = min(r, a[i] + x);       }     }     return (l <= s1 && s1 <= r) || (l <= s2 && s2 <= r);   }   int main() {     scanf( %d%d%d , &n, &s1, &s2);     for (int i = 1; i <= n; i++) {       scanf( %d , &a[i]);     }     int l = abs(s1 - s2), r = 1e9, ans = 1e9;     while (l <= r) {       int mid = (l + r) / 2;       if (check(mid)) {         r = mid - 1;         ans = mid;       } else {         l = mid + 1;       }     }     printf( %d , ans);     return 0;   }   