func_code_string: #include <bits/stdc++.h>   using namespace std;   using ld = long double;   using ll = long long;   using ull = unsigned long long;   const int INF = 1 << 30;   const ll LINF = 1LL << 60;   const int SZ = 1 << 13;   char buff[SZ], *pos = buff + SZ - 1;   inline ll read() {     ll x = 0;     int f = 1,         c = (++pos == buff + SZ ? fread(pos = buff, 1, SZ, stdin), *pos : *pos);     for (; !isdigit(c);          c = (++pos == buff + SZ ? fread(pos = buff, 1, SZ, stdin), *pos : *pos))       if (c ==  - ) f = -f;     for (; isdigit(c);          c = (++pos == buff + SZ ? fread(pos = buff, 1, SZ, stdin), *pos : *pos))       x = (x << 3) + (x << 1) + (c ^ 48);     return x * f;   }   const int N = 5005;   int n;   int T;   int t[N];   ld p[N], pw[N];   ld dp[2][N];   int main() {     cout << fixed << setprecision(9);     n = read(), T = read();     for (int i = 1; i <= n; ++i)       p[i] = read() / 100.0, t[i] = read(), pw[i] = pow(1 - p[i], t[i] - 1);     ld ans = 0;     dp[0][0] = 1;     int pp = 0, qq = 1;     for (int i = 1; i <= n; ++i) {       ld sum = 0;       for (int j = 1; j <= T; ++j) {         sum = sum * (1 - p[i]) + dp[pp][j - 1];         if (j >= t[i]) sum -= dp[pp][j - t[i]] * pw[i];         dp[qq][j] = sum * p[i];         if (j >= t[i]) dp[qq][j] += dp[pp][j - t[i]] * pw[i];         ans += dp[qq][j];       }       swap(pp, qq);       memset(dp[qq], 0, sizeof dp[qq]);     }     cout << ans;     return 0;   }   