func_code_string: #include <bits/stdc++.h>   using namespace std;   const int N = 2e5 + 10, mod = 1e9 + 7;   int ans[N], a[N];   vector<pair<int, int> > v;   int32_t main() {     ios_base::sync_with_stdio(false);     cin.tie(0);     cout.tie(0);     int n, m;     cin >> n >> m;     long long sum = 0;     for (int i = 0; i < m; i++) {       cin >> a[i];       sum += a[i];     }     if (sum < n) return cout << -1, 0;     int cur = 0;     for (int i = 0; i < m; i++) {       if (n - cur < a[i]) return cout << -1, 0;       ans[i] = cur;       sum -= a[i];       cur++;       a[i]--;       while (a[i] && n - cur > sum) cur++, a[i]--;     }     for (int i = 0; i < m; i++) cout << ans[i] + 1 <<    ;     return 0;   }   