func_code_string: #include <bits/stdc++.h>   using namespace std;   const int maxn = 1e5 + 30;   int n, a[maxn];   long long k, res;   bool check(long long x) {     long long sum = 0;     for (int i = 0; i < n; ++i) {       sum += min((long long)a[i], x);       if (sum > k) return false;     }     return true;   }   int main() {     scanf( %d%I64d , &n, &k);     long long sum = 0;     for (int i = 0; i < n; ++i) {       scanf( %d , &a[i]);       sum += a[i];     }     if (k > sum) {       printf( -1 n );       return 0;     }     long long l = 0, r = sum;     while (l <= r) {       long long m = l + (r - l) / 2;       if (check(m))         l = m + 1;       else         r = m - 1;     }     sum = 0;     for (int i = 0; i < n; ++i) sum += min((long long)a[i], r);     res = k - sum;     int st = 0, flag = 1;     for (int i = 0; i < n; ++i) {       a[i] -= min((long long)a[i], r);       if (a[i]) {         if (res == 0 && flag) {           flag = 0;           st = i;         } else if (res > 0) {           --res;           --a[i];         }       }     }     for (int i = st; i < n; ++i)       if (a[i]) printf( %d  , i + 1);     for (int i = 0; i < st; ++i)       if (a[i]) printf( %d  , i + 1);     puts(  );     return 0;   }   