func_code_string: #include <bits/stdc++.h>   using namespace std;   const int MAXN = 200010;   struct Node {     long long dis, mxdis;     int id;     bool operator<(const Node &rhs) const {       if (dis == rhs.dis) return mxdis < rhs.mxdis;       return dis < rhs.dis;     }   } p[MAXN];   struct NO {     long long dis, mxdis;     int id;     NO(long long x, long long y, int z) {       dis = x, mxdis = y;       id = z;     }     bool operator<(const NO &rhs) const { return mxdis > rhs.mxdis; }   };   priority_queue<NO> q;   long long l[MAXN], r[MAXN];   struct Node1 {     long long val;     int id;     bool operator<(const Node1 &rhs) const { return val < rhs.val; }   } a[MAXN];   int ans[MAXN];   int main() {     int n, m, i;     while (scanf( %d%d , &n, &m) == 2) {       for (i = 0; i < n; i++) {         scanf( %lld%lld , &l[i], &r[i]);         if (i > 0) {           p[i].dis = l[i] - r[i - 1];           p[i].mxdis = r[i] - l[i - 1];           p[i].id = i;         }       }       sort(p + 1, p + n);       for (i = 0; i < m; i++) {         scanf( %lld , &a[i].val);         a[i].id = i;       }       sort(a, a + m);       int left = 1;       while (!q.empty()) q.pop();       int ok = 1;       if (n > m + 1) {         printf( No n );         continue;       }       for (i = 0; i < m; i++) {         while (a[i].val >= p[left].dis && left < n) {           q.push(NO(p[left].dis, p[left].mxdis, p[left].id));           left++;         }         if (!q.empty()) {           NO x = q.top();           q.pop();           if (x.mxdis >= a[i].val)             ans[x.id] = a[i].id + 1;           else {             ok = 0;             break;           }         }       }       if (ok && q.empty() && left == n) {         printf( Yes n );         for (i = 1; i < n; i++) printf( %d%c , ans[i], (i == n - 1) ?   n  :    );       } else         printf( No n );     }     return 0;   }   