func_code_string: #include <bits/stdc++.h>   using namespace std;   int v[4005], d[14005];   long long int p[4005];   bool done[4005];   vector<int> vec;   int main() {     int n, val, ans = 0;     cin >> n;     for (int i = 0; i < n; i++) {       cin >> v[i] >> d[i] >> p[i];     }     for (int i = 0; i < n; i++) {       if (done[i]) continue;       vec.push_back(i + 1);       ans++;       val = 0;       for (int j = i + 1; j < n; j++) {         if (!done[j]) {           if (val == v[i]) break;           p[j] -= v[i] - val;           val++;         }       }       long long int val = 0;       for (int j = i + 1; j < n; j++) {         if (done[j] == 1) continue;         p[j] -= val;         if (p[j] < 0) {           val += d[j];           done[j] = 1;         }       }     }     sort(vec.begin(), vec.end());     cout << ans << endl;     for (int i = 0; i < vec.size(); i++) cout << vec[i] <<    ;   }   