func_code_string: #include <bits/stdc++.h>   int n, m, seg[300005], lazy[300005], d[200005], l[200005], r[200005], q[200005];   bool b = 1;   void update(int root, int lo, int hi, int l, int r, int val) {     if (lazy[root]) {       seg[root] |= lazy[root];       if (lo ^ hi) {         lazy[root * 2 + 1] |= lazy[root];         lazy[root * 2 + 2] |= lazy[root];       }       lazy[root] = 0;     }     if (lo >= l && hi <= r) {       seg[root] |= val;       if (lo ^ hi) {         lazy[root * 2 + 1] |= val;         lazy[root * 2 + 2] |= val;       }     } else if (lo > r || hi < l)       return;     else {       update(root * 2 + 1, lo, (lo + hi) / 2, l, r, val);       update(root * 2 + 2, (lo + hi) / 2 + 1, hi, l, r, val);     }   }   int query(int root, int lo, int hi, int l, int r) {     if (lazy[root]) {       seg[root] |= lazy[root];       if (lo ^ hi) {         lazy[root * 2 + 1] |= lazy[root];         lazy[root * 2 + 2] |= lazy[root];       }       lazy[root] = 0;     }     if (lo >= l && hi <= r) {       if (lo == hi) d[lo] = seg[root];       return seg[root];     } else if (lo > r || l > hi)       return -1;     else       return query(root * 2 + 1, lo, (lo + hi) / 2, l, r) &              query(root * 2 + 2, (lo + hi) / 2 + 1, hi, l, r);   }   int main() {     scanf( %d%d , &n, &m);     for (int i = 0; i < m; i++) {       scanf( %d%d%d , l + i, r + i, q + i);       update(0, 0, n - 1, l[i] - 1, r[i] - 1, q[i]);     }     for (int i = 0; i < m && b; i++)       b = query(0, 0, n - 1, l[i] - 1, r[i] - 1) == q[i];     if (b) {       printf( YES n );       for (int i = 0; i < n; i++)         printf( %d%c , d[i] ? d[i] : query(0, 0, n - 1, i, i),                i + 1 < n ? 32 : 10);     } else       printf( NO n );   }   