func_code_string: #include <bits/stdc++.h>   using namespace std;   int main() {     ios::sync_with_stdio(0);     cin.tie(0);     int n, m;     cin >> n >> m;     vector<vector<long long> > PRE(32, vector<long long>(n + 2, 0)),         ZEROS(32, vector<long long>(n + 2, 0));     vector<long long> L(m), R(m), Q(m);     for (int i = 0; i < m; ++i) {       cin >> L[i] >> R[i] >> Q[i];       for (int j = 0; j < 32; ++j) {         int ind = 1 << j;         if (ind & Q[i]) {           PRE[j][L[i]]++;           PRE[j][R[i] + 1]--;         }       }     }     for (int i = 0; i < 32; ++i) {       for (int j = 1; j < n + 2; ++j) {         PRE[i][j] += PRE[i][j - 1];         if (PRE[i][j] == 0) ZEROS[i][j]++;         ZEROS[i][j] += ZEROS[i][j - 1];       }     }     for (int i = 0; i < m; ++i) {       int l = L[i], r = R[i], q = Q[i];       for (int j = 0; j < 32; ++j) {         int ind = 1 << j;         if (!(ind & q) && ZEROS[j][r] - ZEROS[j][l - 1] == 0) {           cout <<  NO n ;           return 0;         }       }     }     cout <<  YES n ;     for (int i = 1; i <= n; ++i) {       if (i != 1) cout <<    ;       int aux = 0;       for (int j = 0; j < 32; ++j) {         int ind = 1 << j;         if (PRE[j][i]) {           aux |= ind;         }       }       cout << aux;     }     cout <<   n ;     return 0;   }   