func_code_string: #include <bits/stdc++.h>   using namespace std;   void solve() {     int n, d, m;     cin >> n >> m >> d;     int c[m], sum = 0;     for (int i = 0; i < m; i++) {       cin >> c[i];       sum += c[i];     }     d--;     if (sum + (m + 1) * d >= n) {       cout <<  YES  << endl;       int k = (d > 0 ? (n - sum) / d : 0), res = (d > 0 ? (n - sum) % d : 0),           cnt = 0, id = 0;       bool flag = 1;       for (int i = 1; i <= n; i++) {         int j;         if (cnt == k && res) {           k++, d = res;           res = 0;         }         if (cnt < k && flag) {           for (j = i; j < i + d && j <= n; j++) {             cout << 0 <<    ;           }           cnt++;         } else {           for (j = i; j < i + c[id]; j++) {             cout << id + 1 <<    ;           }           id++;         }         flag = !flag;         i = j - 1;       }       cout << endl;     } else       cout <<  NO  << endl;   }   signed main() {     ios_base::sync_with_stdio(0);     cin.tie(0);     cout.tie(0);     int t = 1;     while (t--) {       solve();     }   }   