func_code_string: #include <bits/stdc++.h>   using namespace std;   int main() {     long long n, k, m, a[100100], sum = 0;     priority_queue<pair<long long, long long>,                    vector<pair<long long, long long> >,                    greater<pair<long long, long long> > >         pq;     cin >> n >> k;     for (int i = 1; i <= n; i++) {       cin >> a[i];       sum += a[i];       pq.push(make_pair(a[i], i));     }     if (sum < k) {       cout << -1 << endl;       return 0;     }     long long last = 0;     while (!pq.empty()) {       long long x = pq.top().first;       if ((x - last) * pq.size() <= k) {         k -= (x - last) * pq.size();         last = x;         while (!pq.empty()) {           if (pq.top().first == x)             pq.pop();           else             break;         }       } else         break;     }     long long temp = pq.size();     if (temp == 0) return 0;     m = k % temp;     long long o = k / temp;     for (int i = 1; i <= n; i++) a[i] -= (last + o);     deque<long long> dq;     m = k % temp;     for (int i = 1; i <= n; i++) {       if (a[i] > 0) dq.push_back(i);     }     for (int i = 0; i < m; i++) {       if (dq.empty()) return 0;       long long x = dq.front();       dq.pop_front();       if (a[x] > 0) dq.push_back(x);       a[x]--;     }     while (!dq.empty()) {       if (a[dq.front()] > 0) cout << dq.front() <<    ;       dq.pop_front();     }     return 0;   }   