func_code_string: #include <bits/stdc++.h>   using namespace std;   int N, M, T, tb[100005];   long long a, b, c, co, x;   map<int, int> mp;   map<int, int>::iterator it;   int chk[100005];   int main() {     int i, j, k;     scanf( %d%I64d , &N, &co);     for (i = 1; i <= N; i++) {       scanf( %d , &tb[i]);       mp[tb[i]]++;       x += tb[i];     }     if (x < co) {       printf( -1 n );       scanf(   );       return 0;     } else if (x == co) {       printf(  n );       scanf(   );       return 0;     }     a = N;     b = 0;     for (it = mp.begin(); it != mp.end(); it++) {       k = (*it).first;       j = (*it).second;       if (c + a * (k - b) > co) break;       c += a * (k - b);       b = k;       a -= j;     }     a = k - b;     long long num = co - c;     int idx = 0;     for (i = 1; i <= N; i++) {       if (tb[i] >= k) {         chk[idx] = i;         idx++;       }     }     b = num / idx;     num %= idx;     i = num;     bool err = true;     for (int kk = 1; kk <= idx; kk++) {       if (b != a - 1 || ((b == a - 1 && tb[chk[i]] != k) || err))         printf( %d  , chk[i]);       i++;       if (i >= idx) {         i %= idx;         err = false;       }     }     scanf(   );   }   