func_code_string: #include <bits/stdc++.h>   using namespace std;   vector<pair<int, int> > ans;   int p[2000], damage[2000], u[2000];   int main() {     int n, Max, r, used = 0, TT;     cin >> n >> Max >> r;     for (int i = 1; i <= n; i++) cin >> p[i] >> damage[i];     int cap = Max;     memset(u, 0, sizeof(u));     for (int s = 0;; s++) {       int cur = -1;       for (int i = 1; i <= n; i++)         if (!u[i] && p[i] / 100.00 >= Max / double(cap))           if (cur == -1 || damage[i] > damage[cur]) cur = i;       if (cur == -1 && r >= 0) {         cout <<  NO  << endl;         return 0;       }       if (cur != -1) {         r -= damage[cur];         u[cur] = 1;         used++;         ans.push_back(make_pair(s, cur));       }       Max += r;       if (Max > cap) Max = cap;       if (Max <= 0) {         TT = s + 1;         break;       }     }     cout <<  YES  << endl;     cout << TT <<     << ans.size() << endl;     for (int i = 0; i < ans.size(); i++)       cout << ans[i].first <<     << ans[i].second << endl;     return 0;   }   