func_code_string: #include <bits/stdc++.h>   using namespace std;   using ll = long long;   using ld = long double;   using uint = unsigned int;   using ull = unsigned long long;   using pii = pair<int, int>;   int f[50], s[50], p[50];   ld dp[51][5000];   int main() {     cin.tie(nullptr);     cout.tie(nullptr);     ios_base::sync_with_stdio(false);     int n, r;     cin >> n >> r;     for (int i = 0; i < n; i++) cin >> f[i] >> s[i] >> p[i];     ld l = 0, h = 1e9;     int rep = 80;     while (rep--) {       ld m = (l + h) / 2;       for (int i = n - 1; i >= 0; i--) {         fill(dp[i + 1] + min(5000, r + 1), dp[i + 1] + 5000, m);         for (int j = 0; j <= r; j++) {           ld ff = (dp[i + 1][j + f[i]] + f[i]) * p[i];           ld ss = (dp[i + 1][j + s[i]] + s[i]) * (100 - p[i]);           dp[i][j] = min(m, (ff + ss) / 100);         }       }       if (dp[0][0] < m) {         h = m;       } else {         l = m;       }     }     cout << fixed << setprecision(20) << l;     return 0;   }   