func_code_string: #include <bits/stdc++.h>   using std::max;   int n, m, c, x[150000 + 1], a, b, i;   long long p[150000 + 1], ans = 0;   struct node {     long long sum, mmax, lmax, rmax;     void update(const node &l, const node &r) {       sum = l.sum + r.sum;       lmax = max(l.lmax, l.sum + r.lmax);       rmax = max(l.rmax + r.sum, r.rmax);       mmax = max(l.mmax, max(r.mmax, l.rmax + r.lmax));     }   } tree[(150000 << 2) + 1];   void build(int x, int l, int r) {     if (l == r) {       tree[x].sum = tree[x].mmax = tree[x].lmax = tree[x].rmax = p[l];       return;     }     int mid = (l + r) >> 1;     build(x << 1, l, mid);     build((x << 1) + 1, mid + 1, r);     tree[x].update(tree[x << 1], tree[(x << 1) + 1]);   }   node find(int x, int l, int r, int s, int t) {     if (s == l && t == r) return tree[x];     int mid = (l + r) >> 1;     if (t <= mid) return find(x << 1, l, mid, s, t);     if (s > mid) return find((x << 1) + 1, mid + 1, r, s, t);     node ret;     ret.update(find(x << 1, l, mid, s, mid),                find((x << 1) + 1, mid + 1, r, mid + 1, t));     return ret;   }   int main() {     scanf( %d%d%d , &n, &m, &c);     for (i = 1; i <= n; ++i) scanf( %d , x + i);     for (i = 1; i < n; ++i) scanf( %d , p + i);     for (i = 1; i < n; ++i) p[i] = 50 * (x[i + 1] - x[i]) - p[i] * c;     --n;     build(1, 1, n);     for (i = 1; i <= m; ++i) {       scanf( %d%d , &a, &b);       ans += max(0LL, find(1, 1, n, a, b - 1).mmax);     }     printf( %0.9llf n , (double)ans / 100);     return 0;   }   