func_code_string: #include <bits/stdc++.h>   using namespace std;   int n, m;   long long l[200001], r[200001];   struct data {     long long l, r, ans, num;     bool operator<(const data &p) const { return r > p.r; }   } a[300001];   priority_queue<data> q;   bool cmp(data p, data q) {     if (p.l == q.l) return p.num < q.num;     return p.l < q.l;   }   bool cmp2(data p, data q) { return p.num < q.num; }   int main() {     scanf( %d%d , &n, &m);     for (int i = 1; i <= n; i++) scanf( %lld%lld , &l[i], &r[i]);     for (int i = 1; i < n; i++) {       a[i].l = l[i + 1] - r[i];       a[i].r = r[i + 1] - l[i];       a[i].num = i;     }     for (int i = n; i <= m + n - 1; i++) {       long long x;       scanf( %lld , &x);       a[i].num = i;       a[i].l = x;     }     sort(a + 1, a + m + n, cmp);     for (int i = 1; i <= m + n - 1; i++) {       if (a[i].num < n) {         data now = a[i];         now.num = i;         q.push(now);         continue;       }       if (q.empty()) continue;       data now = q.top();       q.pop();       if (now.r < a[i].l) {         printf( No n );         return 0;       }       a[now.num].ans = a[i].num - n + 1;     }     if (!q.empty()) {       printf( No n );       return 0;     }     printf( Yes n );     sort(a + 1, a + n + m, cmp2);     for (int i = 1; i < n; i++) printf( %d  , a[i].ans);     return 0;   }   