func_code_string: #include <bits/stdc++.h>   using namespace std;   struct event {     int pos, type, p;     event(int pos = 0, int type = -1, int p = 0) : pos(pos), type(type), p(p) {}     bool operator<(const event &e) const {       if (pos == e.pos) return type < e.type;       return pos < e.pos;     }   };   const int maxE = 5e5 + 10;   event E[maxE];   int cnt[111];   double fpow(double a, int n) {     double r = 1;     for (; n; n = n >> 1) {       if (n & 1) r *= a;       a = a * a;     }     return r;   }   int main() {     memset((cnt), (0), sizeof(cnt));     int n, m, x, h, l, r, sz = 0, b, z;     scanf( %d%d , &n, &m);     for (int _n(n), i(0); i < _n; i++) {       scanf( %d%d%d%d , &x, &h, &l, &r);       l = 100 - l;       r = 100 - r;       E[sz++] = event(x - h, 0, l);       E[sz++] = event(x, 0, -1 - l);       E[sz++] = event(x + 1, 0, r);       E[sz++] = event(x + h + 1, 0, -1 - r);     }     for (int _n(m), i(0); i < _n; i++) {       scanf( %d%d , &b, &z);       E[sz++] = event(b, z);     }     sort(E, E + sz);     double expectation = 0, pro = 0;     for (int _n(sz), i(0); i < _n; i++) {       if (E[i].type == 0) {         if (E[i].p >= 0) {           cnt[E[i].p]++;         } else           cnt[-E[i].p - 1]--;       } else {         pro = 1;         for (int _n(101), i(0); i < _n; i++) pro *= fpow(0.01 * i, cnt[i]);         expectation += pro * E[i].type;       }     }     printf( %.7f n , expectation);     return 0;   }   