func_code_string: #include <bits/stdc++.h>   using namespace std;   int n, m;   int l[100005], r[100005], q[100005];   struct node {     int v, add;   };   node t[4 * 100005];   const int MX = (1LL << 31) - 1;   void Push(int v, int tl, int tm, int tr) {     if (t[v].add != 0) {       t[2 * v].add |= t[v].add;       t[2 * v].v |= t[v].add;       t[2 * v + 1].add |= t[v].add;       t[2 * v + 1].v |= t[v].add;       t[v].add = 0;     }   }   void Update(int v, int tl, int tr, int l, int r, int value) {     if (l > r) return;     if ((tl == l) && (tr == r)) {       t[v].add |= value;       t[v].v |= value;       return;     }     int tm = (tl + tr) / 2;     Push(v, tl, tm, tr);     Update(2 * v, tl, tm, l, min(tm, r), value);     Update(2 * v + 1, tm + 1, tr, max(l, tm + 1), r, value);     t[v].v &= t[2 * v].v;     t[v].v &= t[2 * v + 1].v;   }   int Get(int v, int tl, int tr, int l, int r) {     if (l > r) return MX;     if ((tl == l) && (tr == r)) return t[v].v;     int tm = (tl + tr) / 2;     Push(v, tl, tm, tr);     return Get(2 * v, tl, tm, l, min(tm, r)) &            Get(2 * v + 1, tm + 1, tr, max(l, tm + 1), r);   }   int main() {     scanf( %d %d , &n, &m);     for (int(i) = (0); (i) < int(m); ++(i)) {       scanf( %d %d %d , l + i, r + i, q + i);       Update(1, 0, n - 1, l[i] - 1, r[i] - 1, q[i]);     }     bool Ok = 1;     for (int(i) = (0); (i) < int(m); ++(i)) {       int x = Get(1, 0, n - 1, l[i] - 1, r[i] - 1);       if (x != q[i]) {         Ok = 0;         break;       }     }     if (!Ok) {       puts( NO );       cin.sync();       cin.get();       return 0;     } else {       puts( YES );       for (int(i) = (0); (i) < int(n); ++(i)) {         printf( %d  , Get(1, 0, n - 1, i, i));       }     }     cin.sync();     cin.get();     return 0;   }   