func_code_string: #include <bits/stdc++.h>   using namespace std;   const double eps = 1e-7;   const int inf = 0x3f3f3f3f;   const int hinf = 0x3f3f3f3f;   const long long mod = 1000000009;   struct node {     int l, r;     double expe;     double add;   } sgt[100010 << 2];   int n, m;   int a[100010], h[100010], l[100010], r[100010];   struct mushroom {     int b, z;     bool operator<(const mushroom& bb) const { return b < bb.b; }   } dat[100010];   void up(int root) {     sgt[root].expe = sgt[root << 1].expe + sgt[root << 1 | 1].expe;   }   void down(int root) {     sgt[root << 1].add *= sgt[root].add;     sgt[root << 1].expe *= sgt[root].add;     sgt[root << 1 | 1].add *= sgt[root].add;     sgt[root << 1 | 1].expe *= sgt[root].add;     sgt[root].add = 1.0;   }   void build(int l, int r, int root) {     sgt[root].l = l;     sgt[root].r = r;     sgt[root].expe = 0.0;     sgt[root].add = 1.0;     if (l == r) {       sgt[root].expe = dat[sgt[root].l].z;       return;     }     int mid = (l + r) >> 1;     build(l, mid, root << 1);     build(mid + 1, r, root << 1 | 1);     up(root);   }   void upd(int l, int r, double val, int root) {     if (l > dat[sgt[root].r].b || r < dat[sgt[root].l].b) return;     if (dat[sgt[root].l].b >= l && dat[sgt[root].r].b <= r) {       sgt[root].add *= val;       sgt[root].expe *= val;       return;     }     down(root);     int mid = (sgt[root].l + sgt[root].r) >> 1;     if (l <= dat[mid].b) upd(l, r, val, root << 1);     if (r >= dat[mid].b) upd(l, r, val, root << 1 | 1);     up(root);   }   int main() {     scanf( %d%d , &n, &m);     for (int i = 1; i <= n; i++) {       scanf( %d%d%d%d , &a[i], &h[i], &l[i], &r[i]);     }     for (int i = 1; i <= m; i++) {       scanf( %d%d , &dat[i].b, &dat[i].z);     }     sort(dat + 1, dat + 1 + m);     build(1, m, 1);     for (int i = 1; i <= n; i++) {       upd(a[i] - h[i], a[i] - 1, 1.0 - l[i] / 100.0, 1);       upd(a[i] + 1, a[i] + h[i], 1.0 - r[i] / 100.0, 1);     }     printf( %.15lf n , sgt[1].expe);   }   