func_code_string: #include <bits/stdc++.h>   using namespace std;   const double PI = acos(-1.0);   const int INF = 1000 * 1000 * 1000 + 7;   const long long LINF = INF * (long long)INF;   const int MAX = 2 * 1000 * 100 + 47;   struct Item {     int a, t, ind;     bool operator<(const Item& a) const { return t < a.t; }   };   Item A[MAX];   int n, t;   bool ok(int k) {     long long time = 0;     int cnt = 0;     for (int i = (0); i < (n); i++) {       int a = A[i].a;       int tt = A[i].t;       if (a >= k && time + tt <= t) {         cnt++;         time += tt;       }     }     return cnt >= k;   }   int main() {     ios::sync_with_stdio(false);     cin.tie(0);     cin >> n >> t;     for (int i = (0); i < (n); i++) {       cin >> A[i].a >> A[i].t;       A[i].ind = i;     }     sort(A, A + n);     int l = 0, r = n + 1;     while (r - l > 1) {       int c = (r + l) / 2;       if (ok(c)) {         l = c;       } else {         r = c;       }     }     int cnt = l;     cout << cnt <<   n  << cnt <<   n ;     for (int i = (0); i < (n); i++) {       if (cnt == 0) break;       if (A[i].a >= l) {         cnt--;         cout << A[i].ind + 1 <<    ;       }     }   }   