func_code_string: #include <bits/stdc++.h>   using namespace std;   long long c[2000], d[2000];   long long u[2000], b[2000];   int main() {     long long n, m, d;     long long lpl = 0;     cin >> n >> m >> d;     for (int i = 0; i < m; i++) {       cin >> c[i];       lpl += c[i];     }     if (lpl == n) {       cout <<  YES  << endl;       for (int i = 0; i < m; i++) {         for (int j = 0; j < c[i]; j++) {           cout << i + 1 <<    ;         }       }       cout << endl;       return 0;     }     long long st = 0;     long long flag = 0;     for (int i = 0; i < m; i++) {       long long op = c[i];       op = n - (lpl - op) - 1;       long long to = st + d;       long long ss = op - c[i] + 1;       if (to > ss) {         u[i] = ss;         st = ss + c[i] - 1;       }       if (to <= ss) {         u[i] = to;         st = to + c[i] - 1;       }       lpl -= c[i];     }     if (st + d > n) {       cout <<  YES  << endl;       for (int i = 0; i < m; i++) {         for (int j = u[i]; j < u[i] + c[i]; j++) {           b[j] = i + 1;         }       }       for (int i = 1; i <= n; i++) {         cout << b[i] <<    ;       }       cout << endl;     } else {       cout <<  NO  << endl;     }     return 0;   }   