func_code_string: #include <bits/stdc++.h>   using namespace std;   const int MAX_N = 5500;   int n, T;   double p[MAX_N];   int t[MAX_N];   double dq[MAX_N];   int main() {     scanf( %d%d , &n, &T);     for (int i = 0; i < n; i++) {       scanf( %lf%d , &p[i], &t[i]);       p[i] /= 100;     }     vector<double> cur(T + 1), nxt(T + 1);     double exp = 0;     cur[0] = 1;     for (int i = 0; i < n; i++) {       double prb = 0;       double f = 1.0;       int s1 = 0, s2 = 0;       for (int j = 0; j < t[i] - 1; j++) {         f *= 1.0 - p[i];       }       for (int j = 0; j <= T; j++) {         double poped = 0;         if (s2 - s1 > t[i] - 1) {           poped = dq[s1];           prb -= f * dq[s1];           s1++;         }         nxt[j] = f * poped + prb * p[i];         dq[s2] = cur[j];         s2++;         prb = (1.0 - p[i]) * prb + cur[j];       }       exp += i * prb;       cur.swap(nxt);       fill(nxt.begin(), nxt.end(), 0);     }     printf( %.15f n , exp + n * accumulate(cur.begin(), cur.end(), 0.0));   }   