func_code_string: #include <bits/stdc++.h>   using namespace std;   using ll = long long;   void dout() { cerr << endl; }   template <typename Head, typename... Tail>   void dout(Head H, Tail... T) {     cerr << H <<    ;     dout(T...);   }   mt19937 rnd(time(0));   struct Node {     Node* left = nullptr;     Node* right = nullptr;     int prior;     int size = 1;     double val;     double sleft;     double sright;     double sum;     double mss;     Node(double v)         : prior(rnd()),           val(v),           sleft(max(0.0, v)),           sright(max(0.0, v)),           sum(v),           mss(max(0.0, v)) {}   };   int _size(Node* n) { return n ? n->size : 0; }   double _sleft(Node* n) { return n ? n->sleft : 0; }   double _sright(Node* n) { return n ? n->sright : 0; }   double _sum(Node* n) { return n ? n->sum : 0; }   double _mss(Node* n) { return n ? n->mss : 0; }   void update(Node* n) {     n->size = _size(n->left) + _size(n->right) + 1;     n->sum = _sum(n->left) + _sum(n->right) + n->val;     n->sleft = max(_sleft(n->left), _sum(n->left) + n->val + _sleft(n->right));     n->sright =         max(_sright(n->right), _sum(n->right) + n->val + _sright(n->left));     n->mss = max({_mss(n->left), _mss(n->right),                   _sright(n->left) + n->val + _sleft(n->right)});   }   struct Treap {     Node* root = nullptr;     pair<Node*, Node*> split(Node* n, int index) {       if (!n) return make_pair(nullptr, nullptr);       int sz = _size(n->left) + 1;       if (index < sz) {         auto [l, r] = split(n->left, index);         n->left = r;         update(n);         return make_pair(l, n);       } else {         auto [l, r] = split(n->right, index - sz);         n->right = l;         update(n);         return make_pair(n, r);       }     }     Node* merge(Node* l, Node* r) {       if (!l || !r) return l ? l : r;       if (l->prior > r->prior) {         l->right = merge(l->right, r);         update(l);         return l;       } else {         r->left = merge(l, r->left);         update(r);         return r;       }     }     void push_back(double v) { root = merge(root, new Node(v)); }     double max_subarray_sum(int left, int right) {       auto [x, r] = split(root, right);       auto [l, m] = split(x, left);       double ans = _mss(m);       root = merge(l, merge(m, r));       return ans;     }   };   int main() {     ios::sync_with_stdio(false);     cin.tie(nullptr);     int n, m, c;     cin >> n >> m >> c;     vector<double> x(n);     for (int i = 0; i < n; i++) {       cin >> x[i];     }     vector<double> p(n);     for (int i = 1; i < n; i++) {       cin >> p[i];       p[i] /= 100.0;     }     Treap treap;     treap.push_back(0);     for (int i = 1; i < n; i++) {       treap.push_back((x[i] - x[i - 1]) * 0.5 - p[i] * c);     }     double ans = 0.0;     for (int i = 0; i < m; i++) {       int l, r;       cin >> l >> r;       ans += treap.max_subarray_sum(l, r);     }     cout << fixed << setprecision(9) << ans;     return 0;   }   