func_code_string: #include <bits/stdc++.h>   using namespace std;   int n, T;   vector<int> intp;   vector<int> t;   vector<double> p;   vector<vector<long double> > dp;   vector<vector<long double> > pows;   long double ans;   void addAns(const vector<long double>& prob, int index) {     for (int j = 1; j <= T; j++) {       if (index == n - 1) {         ans += prob[j] * n;         continue;       }       if (j + t[index + 1] > T) {         ans += prob[j] * (index + 1) * pows[100 - intp[index + 1]][T - j];       }     }   }   int main() {     cin >> n >> T;     intp = vector<int>(n);     p = vector<double>(n);     t = vector<int>(n);     for (int i = 0; i < (int)(n); i++) {       cin >> intp[i] >> t[i];       p[i] = intp[i] / 100.0;     }     pows = vector<vector<long double> >(101, vector<long double>(T + 1));     for (int i = 0; i <= 100; i++) {       pows[i][0] = 1;       for (int j = 1; j <= T; j++) {         pows[i][j] = pows[i][j - 1] * i / 100.0;         if (pows[i][j] < 1e-100) pows[i][j] = 0;       }     }     dp = vector<vector<long double> >(2, vector<long double>(T + 1));     long double curp = 1;     for (int j = 1; j < t[0]; j++) {       dp[0][j] = curp * p[0];       curp *= (1 - p[0]);     }     dp[0][t[0]] = curp;     addAns(dp[0], 0);     for (int i = 1; i < n; i++) {       int ci = i & 1;       int pi = ci ^ 1;       long double sum = 0;       for (int j = 1; j <= T; j++) {         sum = sum * (1 - p[i]) + dp[pi][j - 1];         if (j >= t[i]) {           sum -= dp[pi][j - t[i]] * pows[100 - intp[i]][t[i] - 1];         }         dp[ci][j] = sum * p[i];         if (j >= t[i]) {           dp[ci][j] += dp[pi][j - t[i]] * pows[100 - intp[i]][t[i] - 1];         }       }       addAns(dp[ci], i);     }     cout.precision(16);     cout << fixed << ans << endl;     return 0;   }   