func_code_string: #include <bits/stdc++.h>   using namespace std;   const long long MXN = 2e5 + 10;   long long n, m, sum, maxi;   long long A[MXN], Ans[MXN], Max[MXN];   int main() {     ios::sync_with_stdio(0);     cin.tie(0);     cout.tie(0);     cin >> n >> m;     for (int i = 1; i <= m; i++) cin >> A[i], sum += A[i];     if (sum < n) return cout << -1, 0;     for (int i = 1; i <= m; i++) {       if (i > n - A[i] + 1) return cout << -1, 0;       Ans[i] = i;       Max[i] = max(Max[i - 1], i + A[i] - 1);     }     long long l = Max[m] + 1, r = n, p = m;     while (p >= 1 && l <= r) {       Ans[p] = r - A[p] + 1;       r = r - A[p];       l = Max[p - 1] + 1;       p--;     }     for (int i = 1; i <= m; i++) cout << Ans[i] <<    ;     return 0;   }   