func_code_string: #include <bits/stdc++.h>   using namespace std;   long long tree[3 * 100005];   bool lazy[3 * 100005];   void update(long long node, long long b, long long e, long long i, long long j,               long long v) {     if (i > e || j < b) {       return;     }     if (b >= i && e <= j) {       lazy[node] = true;       { tree[node] = tree[node] | v; }       return;     }     if (lazy[node]) {       tree[node * 2] |= tree[node];       tree[node * 2 + 1] |= tree[node];       lazy[node * 2] = 1;       lazy[node * 2 + 1] = 1;       lazy[node] = 0;     }     update(node * 2, b, (b + e) / 2, i, j, v);     update(node * 2 + 1, (b + e) / 2 + 1, e, i, j, v);     tree[node] = tree[node * 2] & tree[node * 2 + 1];   }   long long query(long long node, long long b, long long e, long long i,                   long long j) {     if (i > e || j < b) {       return (1LL << 33) - 1;     }     if (b >= i && e <= j) {       return tree[node];     }     if (lazy[node]) {       tree[node * 2] |= tree[node];       tree[node * 2 + 1] |= tree[node];       lazy[node * 2] = 1;       lazy[node * 2 + 1] = 1;       lazy[node] = 0;     }     return query(node * 2, b, (b + e) / 2, i, j) &            query(node * 2 + 1, (b + e) / 2 + 1, e, i, j);   }   int main() {     long long n, m;     cin >> n >> m;     pair<long long, long long> p[m + 1];     long long a[m + 1];     memset(tree, 0, sizeof tree);     memset(lazy, 0, sizeof lazy);     for (long long i = 1; i <= m; i++) {       long long x, y, z;       cin >> x >> y >> z;       update(1, 1, n, x, y, z);       p[i].first = x;       p[i].second = y;       a[i] = z;     }     int f = 1;     for (long long i = 1; i <= m; i++) {       long long x = query(1, 1, n, p[i].first, p[i].second);       if (x != a[i]) {         f = 0;       }     }     if (f == 1) {       cout <<  YES n ;       for (long long i = 1; i <= n; i++) {         cout << query(1, 1, n, i, i) <<    ;       }       cout << endl;     } else {       cout <<  NO n ;     }   }   