func_code_string: #include <bits/stdc++.h>   using namespace std;   int getint() {     unsigned int c;     int x = 0;     while (((c = getchar()) -  0 ) >= 10) {       if (c ==  - ) return -getint();       if (!~c) exit(0);     }     do {       x = (x << 3) + (x << 1) + (c -  0 );     } while (((c = getchar()) -  0 ) < 10);     return x;   }   const int L = 222;   const int G = 222;   int nTour, needWin, initCap;   double winProb[200];   int award[200];   double cache[L][L + G + 1][L];   double solve(int pos, int cap, int won) {     double& res = cache[pos][cap][won];     if (res > -1) return res;     if (pos == nTour) {       if (won >= needWin) {         if (cap >= G) {           return res = 1;         } else {           return res = 0;         }       } else {         return res = 0;       }     }     if (award[pos] == -1) {       res = winProb[pos] * solve(pos + 1, cap - 1, won + 1);     } else {       res = winProb[pos] * solve(pos + 1, min(L + G, cap + award[pos]), won + 1);     }     res += (1 - winProb[pos]) * solve(pos + 1, cap, won);     return res;   }   int main() {     int i, j, k, tcc, tc = 1 << 28;     for (tcc = 0; tcc < tc; tcc++) {       nTour = getint();       needWin = getint();       initCap = getint();       for (i = 0; i < nTour; i++) {         winProb[i] = getint() / 100.0;       }       for (i = 0; i < nTour; i++) {         award[i] = getint();       }       for (i = 0; i < L; i++)         for (j = 0; j < L + G + 1; j++)           for (k = 0; k < L; k++) cache[i][j][k] = -1e40;       double res = solve(0, initCap + G, 0);       printf( %.10lf n , res);     }     return 0;   }   