func_code_string: #include <bits/stdc++.h>   using namespace std;   struct segment {     int l, r, p;   } seg[300005];   struct PS {     int l, r, val;   } P[300005 * 20];   int n, m, k, a, b, l, r, tot;   int suf[300005];   int get(int node, int bas, int son, int x, int y) {     if (bas >= x && son <= y) return P[node].val;     bool l = (((bas + son) >> 1) >= x);     bool r = (((bas + son) >> 1) + 1 <= y);     if (l & r)       return max(get(P[node].l, bas, ((bas + son) >> 1), x, y),                  get(P[node].r, ((bas + son) >> 1) + 1, son, x, y));     if (l) return get(P[node].l, bas, ((bas + son) >> 1), x, y);     return get(P[node].r, ((bas + son) >> 1) + 1, son, x, y);   }   void create(int& node) {     node = ++tot;     P[node].val = 1005000000;   }   void up(int& node, int prv, int bas, int son, int x, int val) {     if (!node) create(node);     if (bas == x && son == x) {       P[node].val = min(val, P[prv].val);       return;     }     if (x <= ((bas + son) >> 1)) {       P[node].r = P[prv].r;       up(P[node].l, P[prv].l, bas, ((bas + son) >> 1), x, val);     } else {       P[node].l = P[prv].l;       up(P[node].r, P[prv].r, ((bas + son) >> 1) + 1, son, x, val);     }     P[node].val = max(P[P[node].l].val, P[P[node].r].val);   }   int main() {     P[0].val = 1005000000;     scanf( %d %d %d , &n, &m, &k);     for (int i = 1; i <= k; i++) {       scanf( %d %d %d , &seg[i].l, &seg[i].r, &seg[i].p);     }     sort(seg + 1, seg + 1 + k, [](segment a, segment b) { return a.l < b.l; });     for (int i = k; i >= 1; i--) {       up(suf[i], suf[i + 1], 1, n, seg[i].p, seg[i].r);     }     while (m--) {       scanf( %d %d %d %d , &a, &b, &l, &r);       int bas = 1, son = k;       while (bas <= son) {         if (seg[((bas + son) >> 1)].l < l)           bas = ((bas + son) >> 1) + 1;         else           son = ((bas + son) >> 1) - 1;       }       printf(get(suf[bas], 1, n, a, b) > r ?  no  :  yes );       puts(  );       fflush(stdout);     }   }   