func_code_string: #include <bits/stdc++.h>   using namespace std;   int n, a[100005], mi, mid, ma;   long long m, sum;   bool b[100005], flag;   bool check() {     long long sum = 0;     for (int i = 0; i < n; i++) sum += min(a[i], mid);     return sum <= m;   }   int main() {     cin >> n >> m;     sum = 0;     for (int i = 0; i < n; i++) {       scanf( %d , &a[i]);       sum += a[i];     }     if (sum < m) {       printf( -1 n );     } else if (sum == m) {       printf(  n );     } else {       mi = 0;       ma = 1000000000;       while (mi < ma) {         mid = (mi + ma + 1) >> 1;         if (check())           mi = mid;         else           ma = mid - 1;       }       for (int i = 0; i < n; i++) {         m -= min(a[i], mi);         a[i] -= min(a[i], mi);       }       memset(b, true, sizeof(b));       flag = false;       for (int i = 0; b[i]; i = (i + 1) % n) {         if (a[i]) {           if (m) {             a[i]--;             m--;           } else {             if (flag) printf(   );             flag = true;             b[i] = false;             printf( %d , i + 1);           }         }       }       printf(  n );     }     return 0;   }   