func_code_string: #include <bits/stdc++.h>   using namespace std;   const int N = 5e5 + 10;   const double INF = 1e18;   int n, m, c;   int a[N], p[N], f[N];   double E[N];   struct Node {     double L, M, R, S;     Node() {}     Node(double L, double M, double R, double S) : L(L), M(M), R(R), S(S) {}   };   struct SegmentTree {     Node st[4 * N];     Node Merge(Node A, Node B) {       Node C;       C.L = max(A.L, A.S + B.L);       C.R = max(B.R, B.S + A.R);       C.M = max(A.M, max(B.M, A.R + B.L));       C.S = A.S + B.S;       return C;     }     void Init(int k, int l, int r) {       if (l == r) {         double val = E[l];         st[k] = Node(val, val, val, val);         return;       }       Init(k << 1, l, ((l + r) >> 1));       Init(k << 1 | 1, ((l + r) >> 1) + 1, r);       st[k] = Merge(st[k << 1], st[k << 1 | 1]);     }     Node Query(int k, int l, int r, int i, int j) {       if (l > j || r < i) return Node(-INF, -INF, -INF, 0);       if (i <= l && r <= j) return st[k];       return Merge(Query(k << 1, l, ((l + r) >> 1), i, j),                    Query(k << 1 | 1, ((l + r) >> 1) + 1, r, i, j));     }   } ST;   double Query(int l, int r) {     Node ans = ST.Query(1, 1, n - 1, l, r);     return max(ans.L, max(ans.R, ans.M));   }   int main() {     cin >> n >> m >> c;     for (int i = 1; i <= n; ++i) cin >> a[i];     for (int i = 1; i < n; ++i) cin >> p[i];     for (int i = 1; i < n; ++i) {       double prob = (double)p[i] / 100;       double val = (double)(a[i + 1] - a[i]) / 2 - prob * c;       E[i] = val;     }     ST.Init(1, 1, n - 1);     double ans = 0;     while (m--) {       int u, v;       cin >> u >> v;       ans += max(0.00, Query(u, v - 1));     }     cout << fixed << setprecision(10) << ans << endl;     return 0;   }   