func_code_string: #include <bits/stdc++.h>   using namespace std;   const int maxn = 1e5;   const int maxm = 1e4;   struct tree {     int x, h, Lp, Rp;   } T[maxn + 5];   struct Mushroom {     int x, power;   } M[maxm + 5];   int n, m, cnt, L, R, posx[5 * maxn + 5];   double arr[20 * maxn + 5], lazy[20 * maxn + 5];   inline void Push_Up(int index) {     arr[index] = arr[2 * index] + arr[2 * index + 1];   }   inline void Push_Down(int index) {     double k = lazy[index];     arr[2 * index] *= k;     arr[2 * index + 1] *= k;     lazy[2 * index] *= k;     lazy[2 * index + 1] *= k;     lazy[index] = 1.0;   }   void Build(int index, int L, int R) {     lazy[index] = 1.0;     if (L == R) return;     int mid = L + R >> 1;     Build(2 * index, L, mid);     Build(2 * index + 1, mid + 1, R);   }   void Update_Point(int index, int L, int R, int pos, int value) {     if (L == R) {       arr[index] += value;       return;     }     int mid = L + R >> 1;     if (mid >= pos)       Update_Point(2 * index, L, mid, pos, value);     else       Update_Point(2 * index + 1, mid + 1, R, pos, value);     Push_Up(index);   }   void Update(int index, int L, int R, int UL, int UR, int p) {     if (L >= UL && R <= UR) {       double k = double(p) / 100;       arr[index] *= k;       lazy[index] *= k;       return;     }     if (lazy[index] != 1.0) Push_Down(index);     int mid = L + R >> 1;     if (mid >= UL) Update(2 * index, L, mid, UL, UR, p);     if (UR > mid) Update(2 * index + 1, mid + 1, R, UL, UR, p);     Push_Up(index);   }   int main(void) {     scanf( %d %d , &n, &m);     for (int i = 1; i <= n; ++i) {       scanf( %d %d %d %d , &T[i].x, &T[i].h, &T[i].Lp, &T[i].Rp);       posx[++cnt] = T[i].x - 1;       posx[++cnt] = T[i].x + 1;       posx[++cnt] = T[i].x - T[i].h;       posx[++cnt] = T[i].x + T[i].h;     }     for (int i = 1; i <= m; ++i) {       scanf( %d %d , &M[i].x, &M[i].power);       posx[++cnt] = M[i].x;     }     sort(posx + 1, posx + 1 + cnt);     cnt = unique(posx + 1, posx + 1 + cnt) - posx - 1;     Build(1, 1, cnt);     for (int i = 1; i <= m; ++i) {       L = lower_bound(posx + 1, posx + 1 + cnt, M[i].x) - posx;       Update_Point(1, 1, cnt, L, M[i].power);     }     for (int i = 1; i <= n; ++i) {       L = lower_bound(posx + 1, posx + 1 + cnt, T[i].x - T[i].h) - posx;       R = lower_bound(posx + 1, posx + 1 + cnt, T[i].x - 1) - posx;       Update(1, 1, cnt, L, R, 100 - T[i].Lp);       L = lower_bound(posx + 1, posx + 1 + cnt, T[i].x + 1) - posx;       R = lower_bound(posx + 1, posx + 1 + cnt, T[i].x + T[i].h) - posx;       Update(1, 1, cnt, L, R, 100 - T[i].Rp);     }     printf( %.10lf n , arr[1]);     return 0;   }   