func_code_string: #include <bits/stdc++.h>   using namespace std;   long long value(const vector<long long>& a, long long b) {     long long result = 0;     for (int i = 0; i < a.size(); ++i) {       result += min(b, a[i]);     }     return result;   }   int main() {     long long n, k;     cin >> n >> k;     vector<long long> a(n);     long long sum = 0;     long long max_a = 0;     for (int i = 0; i < n; ++i) {       cin >> a[i];       sum += a[i];       max_a = max(max_a, a[i]);     }     if (sum < k) {       cout << -1;       return 0;     }     int l = 0;     int r = max_a;     while (r - l > 1) {       if (value(a, (l + r) / 2) > k) {         r = (l + r) / 2;       } else {         l = (l + r) / 2;       }     }     if (k >= value(a, r)) {       l = r;     }     k -= value(a, l);     queue<pair<int, int> > q;     for (int i = 0; i < n; ++i) {       if (a[i] > l) {         q.push(make_pair(a[i] - l, i));       }     }     while (k > 0) {       --k;       pair<int, int> t = q.front();       q.pop();       --t.first;       if (t.first > 0) {         q.push(t);       }     }     while (!q.empty()) {       cout << q.front().second + 1 <<    ;       q.pop();     }     return 0;   }   