func_code_string: #include <bits/stdc++.h>   using namespace std;   const int M = 100000 + 10;   struct NODE {     long long int index;     long long int a;     bool operator<(const NODE& x) const { return a < x.a; }   } node[M];   struct SUR {     long long int index;     long long int a;     bool operator<(const SUR& x) const { return index < x.index; }   } sur[M];   int main() {     long long int n, k;     cin >> n >> k;     long long int bk = k;     long long int sum = 0;     for (int i = 0; i < n; i++) {       cin >> node[i].a;       node[i].index = i + 1;       sum += node[i].a;     }     sort(node, node + n);     if (sum < bk) {       cout <<  -1  << endl;     } else {       if (sum > bk) {         long long int p1 = 0;         vector<long long int> psum;         vector<long long int> id;         long long int pmin = 0;         while (p1 < n) {           long long int p2 = p1;           while (p2 < n && node[p2].a == node[p1].a) {             p2++;           }           p2--;           long long int value = (node[p1].a - pmin) * (n - 1 - p1 + 1);           psum.push_back(value);           id.push_back(p1);           pmin = node[p1].a;           p2++;           p1 = p2;         }         long long int tsum = 0;         int index = -1;         for (int i = 0; i < psum.size(); i++) {           if (tsum + psum[i] <= k) {             tsum += psum[i];           } else {             index = i;             break;           }         }         long long int res = k - tsum;         res = res % (n - id[index]);         int istart = 0;         for (int i = id[index]; i < n; i++) {           sur[istart].a = node[i].a;           sur[istart++].index = node[i].index;         }         sort(sur, sur + istart);         long long int lastmin = (id[index] - 1 >= 0 ? node[id[index] - 1].a : 0);         long long int div = (k - tsum) / (n - id[index]);         for (int i = 0; i < istart; i++) {           if (i < res) {             sur[i].a = sur[i].a - 1 - lastmin - div;           } else {             sur[i].a = sur[i].a - lastmin - div;           }         }         vector<int> ans;         for (int i = 0; i < istart; i++) {           if (sur[(i + res) % istart].a > 0) {             ans.push_back(sur[(i + res) % istart].index);           }         }         for (int i = 0; i < ans.size(); i++) {           cout << ans[i];           if (i < ans.size() - 1) {             cout <<    ;           } else {             cout << endl;           }         }       }     }     return 0;   }   