func_code_string: #include <bits/stdc++.h>   int loya[8];   int tloyal[8];   int level[8];   double pb[1 << 8];   int N, K, A;   void init_search(int state, int B, int deepth, int cnt) {     if (deepth == N) {       pb[state] = cnt > (N >> 1) ? 1.0 : A / (double)(A + B);     } else {       init_search(state | (1 << deepth), B, deepth + 1, cnt + 1);       init_search(state, B + level[deepth], deepth + 1, cnt);     }   }   double calcu(double prb, int state, int deepth) {     return (deepth == N)                ? prb * pb[state]                : calcu(prb * (tloyal[deepth] / 10.0), state | (1 << deepth),                        deepth + 1) +                      calcu(prb * (1 - tloyal[deepth] / 10.0), state, deepth + 1);   }   double search(int candy, int deepth) {     double ans = 0.0;     if (deepth == N) {       ans = calcu(1.0, 0, 0);     } else {       int i;       for (i = 0; i <= candy && loya[deepth] + i <= 10; i++) {         tloyal[deepth] = loya[deepth] + i;         double tmp = search(candy - i, deepth + 1);         ans = tmp > ans ? tmp : ans;       }     }     return ans;   }   int main() {     while (scanf( %d %d %d , &N, &K, &A) == 3) {       int i;       for (i = 0; i < N; i++) {         scanf( %d %d , level + i, loya + i);         loya[i] /= 10;       }       init_search(0, 0, 0, 0);       printf( %.10f n , search(K, 0));     }     return 0;   }   