func_code_string: #include <bits/stdc++.h>   using namespace std;   pair<double, double> arr[1000];   int n;   double m, r;   void solve() {     vector<pair<int, int> > v;     double h = m;     int t = 0;     while (h > 0) {       int best_i = -1;       for (int i = 0; i < n; ++i) {         if (arr[i].first >= h) {           if (best_i == -1) {             best_i = i;           } else {             if (arr[i].second > arr[best_i].second) {               best_i = i;             }           }         }       }       if (best_i == -1 && r >= 0) {         printf( NO );         return;       }       if (best_i > -1) {         r -= arr[best_i].second;         arr[best_i].first = -10;         v.push_back(make_pair(t, best_i + 1));       }       h += r;       h = min(h, m);       t++;     }     printf( YES n );     printf( %d %d n , t, int(v.size()));     for (int i = 0; i < int(v.size()); ++i) {       printf( %d %d n , v[i].first, v[i].second);     }   }   int main() {     scanf( %d%lf%lf , &n, &m, &r);     for (int i = 0; i < n; ++i) {       double p, d;       scanf( %lf%lf , &p, &d);       arr[i].first = m / 100 * p;       arr[i].second = d;     }     solve();     return 0;   }   