func_code_string: #include <bits/stdc++.h>   using namespace std;   const int MAX = 100100;   const long long oo = 1e18;   int N;   long long P[MAX], D[MAX];   int L[MAX], R[MAX];   void init_L() {     stack<int> S;     for (int i = 0; i <= N + 1; ++i) {       while (S.size() >= 2) {         int x = S.top();         S.pop();         if (D[x] >= P[i] - P[S.top()]) {           S.push(x);           break;         }       }       if (!S.empty()) L[i] = S.top();       S.push(i);     }   }   void init_R() {     stack<int> S;     for (int i = N + 1; i >= 0; --i) {       while (S.size() >= 2) {         int x = S.top();         S.pop();         if (D[x] >= P[S.top()] - P[i]) {           S.push(x);           break;         }       }       if (!S.empty()) R[i] = S.top();       S.push(i);     }   }   long long low(int x) {     if (x == N + 1) return -1e10;     long long ret = P[R[x]] - D[x];     return ret < P[x] ? ret : +oo;   }   long long high(int x) {     if (x == 0) return +1e10;     long long ret = P[L[x]] + D[x];     return ret > P[x] ? ret : -oo;   }   bool check(long long W) {     multiset<long long> S;     for (int a = 0, b = 0; a <= N; ++a) {       for (; b <= N + 1 && P[b] - P[a] <= W; ++b) S.insert(low(b));       S.erase(S.find(low(a)));       if (!S.empty() && high(a) >= *S.begin()) return true;     }     return false;   }   int main() {     scanf( %d , &N);     for (int i = 0; i <= N + 1; ++i) scanf( %lld , P + i);     for (int i = 1; i <= N; ++i) scanf( %lld , D + i), D[i] *= 2;     D[0] = D[N + 1] = oo;     init_L();     init_R();     if (R[0] != N + 1) {       puts( 0 );       return 0;     }     long long lo = 1, hi = 1e10;     while (lo < hi) {       long long mid = (lo + hi) / 2;       check(mid) ? hi = mid : lo = mid + 1;     }     printf( %.1lf n , lo / 2.0);     return 0;   }   