func_code_string: #include <bits/stdc++.h>   const int maxn = 3e5 + 7;   int ch[maxn << 5][2], max[maxn << 5], n, q, k, l[maxn], r[maxn], id[maxn],       rk[maxn], a, b, x, y, tl, rt[maxn];   int cmp(int x, int y) { return r[x] < r[y]; }   int insert(int rt, int L, int R, int p, int v) {     int nrt = ++tl;     ch[nrt][0] = ch[rt][0];     ch[nrt][1] = ch[rt][1];     max[nrt] = max[rt];     if (L == R) {       max[nrt] = std::max(max[nrt], v);       return nrt;     }     int mid = (L + R) >> 1;     if (p <= mid)       ch[nrt][0] = insert(ch[rt][0], L, mid, p, v);     else       ch[nrt][1] = insert(ch[rt][1], mid + 1, R, p, v);     max[nrt] = std::min(max[ch[nrt][0]], max[ch[nrt][1]]);     return nrt;   }   int query(int rt, int l, int r, int L, int R) {     if (l > R || r < L) return 1e9;     if (l <= L && R <= r) return max[rt];     return std::min(query(ch[rt][0], l, r, L, (L + R) >> 1),                     query(ch[rt][1], l, r, ((L + R) >> 1) + 1, R));   }   int main() {     scanf( %d%d%d , &n, &q, &k);     for (int i = 1; i <= k; ++i) {       scanf( %d%d%d , &l[i], &r[i], &id[i]);       rk[i] = i;     }     std::sort(rk + 1, rk + k + 1, cmp);     for (int i = 1; i <= k; ++i) {       rt[i] = insert(rt[i - 1], 1, n, id[rk[i]], l[rk[i]]);     }     while (q--) {       scanf( %d%d%d%d , &a, &b, &x, &y);       int L = 0, R = k, p;       while (L <= R) {         int mid = (L + R) >> 1;         if (r[rk[mid]] <= y) {           p = mid;           L = mid + 1;         } else           R = mid - 1;       }       if (query(rt[p], a, b, 1, n) >= x)         puts( yes );       else         puts( no );       fflush(stdout);     }     return 0;   }   