func_code_string: #include <bits/stdc++.h>   using namespace std;   const int N = 5555;   int t[N], l[N], r[N], x[N], a[N], dif[N];   int main() {     int n, m;     scanf( %d %d , &n, &m);     for (int i = 0; i < m; ++i) {       scanf( %d %d %d %d , t + i, l + i, r + i, x + i);       --l[i], --r[i];     }     for (int i = 0; i < n; ++i) a[i] = 1000000000;     for (int i = 0; i < m; ++i) {       if (t[i] == 1) {         for (int j = l[i]; j <= r[i]; ++j) {           dif[j] += x[i];         }       } else {         for (int j = l[i]; j <= r[i]; ++j) {           a[j] = min(a[j], x[i] - dif[j]);         }       }     }     for (int i = 0; i < m; ++i) {       if (t[i] == 1) {         for (int j = l[i]; j <= r[i]; ++j) {           a[j] += x[i];         }       } else {         int mx = -2e9;         for (int j = l[i]; j <= r[i]; ++j) {           mx = max(mx, a[j]);         }         if (mx != x[i]) {           puts( NO );           return 0;         }       }     }     puts( YES );     for (int i = 0; i < n; ++i) {       printf( %d  , a[i] - dif[i]);     }   }   