func_code_string: #include <bits/stdc++.h>   using namespace std;   void _fill_int(int* p, int val, int rep) {     int i;     for (i = 0; i < rep; i++) p[i] = val;   }   signed long long GETi() {     signed long long i;     scanf( %lld , &i);     return i;   }   int N, M;   int A[10000], B[10000];   int T[4][10000];   void solve() {     int f, i, j, k, l, x, y;     cin >> N >> M;     for (i = 0; i < N; i++) A[i] = 1 << 29;     for (i = 0; i < M; i++) {       cin >> T[0][i] >> T[1][i] >> T[2][i] >> T[3][i];       T[1][i]--;       T[2][i]--;     }     for (i = M - 1; i >= 0; i--) {       if (T[0][i] == 1) {         for (j = T[1][i]; j <= T[2][i]; j++) A[j] -= T[3][i];       } else {         for (j = T[1][i]; j <= T[2][i]; j++) A[j] = min(A[j], T[3][i]);       }     }     int ng = 0;     memmove(B, A, sizeof(A));     for (i = 0; i < M; i++) {       int y = -1 << 29;       if (T[0][i] == 1)         for (j = T[1][i]; j <= T[2][i]; j++) B[j] += T[3][i];       else {         for (j = T[1][i]; j <= T[2][i]; j++) y = max(y, B[j]);         if (y != T[3][i]) ng = 1;       }     }     if (ng)       (void)printf( NO n );     else {       (void)printf( YES n );       for (i = 0; i < N; i++) (void)printf( %d  , A[i]);       (void)printf(  n );     }   }   int main(int argc, char** argv) {     if (argc > 1) freopen(argv[1],  r , stdin);     solve();     return 0;   }   