func_code_string: #include <bits/stdc++.h>   using namespace std;   int main() {     std::ios_base::sync_with_stdio(0);     long long n, i, k, m, a[4005], v[4005], d[4005], p[4005], j;     cin >> n;     for (i = 0; i <= n - 1; i++) {       cin >> v[i] >> d[i] >> p[i];     }     long long cnt = 0;     for (i = 0; i <= n - 1; i++) {       if (p[i] == 100000000000007) continue;       m = v[i];       a[cnt++] = i + 1;       for (k = i + 1; k <= n - 1; k++) {         if (m == 0) break;         if (p[k] == 100000000000007) continue;         p[k] -= m;         m--;       }       m = 0;       for (k = i + 1; k <= n - 1; k++) {         if (p[k] != 100000000000007) {           p[k] -= m;           if (p[k] < 0) {             m += d[k];             p[k] = 100000000000007;           }         }       }     }     cout << cnt <<   n ;     for (i = 0; i <= cnt - 1; i++) cout << a[i] <<    ;     return 0;   }   