func_code_string: #include <bits/stdc++.h>   using namespace std;   struct point {     double df, de;     void init(double _df, double _de) {       df = _df;       de = _de;     }   } V[100];   int nf, ne, ns, rf, re, rs, df, de;   int n, top, place[13];   double ans = 0, dp[21][21], lf, le, ls;   bool cmp(const point &a, const point &b) { return a.df > b.df; }   double cross(double l1, double r1, double l2, double r2) {     if (l2 >= r1 || l1 >= r2) return 0;     return min(r1, r2) - max(l1, l2);   }   void init_V() {     top = 0;     for (int i = 0; i < n; i++)       if (place[i] < 2) {         double t1 = lf * df, t2 = le * de;         for (int j = 0; j < n; j++)           if (place[j]) {             t1 += df * place[j] *                   cross(j - ls / 2, j + ls / 2, i - lf / 2, i + lf / 2);             t2 += de * place[j] *                   cross(j - ls / 2, j + ls / 2, i - le / 2, i + le / 2);           }         for (int j = 1; j + place[i] <= 2; j++) V[top++].init(t1, t2);       }     sort(V, V + top, cmp);   }   void init_dp() {     memset(dp, 0, sizeof(dp));     for (int i = 0; i <= nf; i++)       for (int j = 0; j <= ne; j++) {         if (i) dp[i][j] = max(dp[i][j], dp[i - 1][j] + V[i + j - 1].df);         if (j) dp[i][j] = max(dp[i][j], dp[i][j - 1] + V[i + j - 1].de);       }     ans = max(ans, dp[nf][ne]);   }   void dfs(int p, int left) {     if ((n - p) * 2 < left) return;     if (p == n) {       init_V();       init_dp();       return;     }     for (int i = 0; i <= 2 && left >= i; i++) {       place[p] = i;       dfs(p + 1, left - i);     }   }   int main() {     cin >> nf >> ne >> ns >> rf >> re >> rs >> df >> de;     n = (nf + ne + ns) / 3 * 2 + 1;     lf = 2 * sqrt(rf * rf - 1.0);     le = 2 * sqrt(re * re - 1.0);     ls = 2 * sqrt(rs * rs - 1.0);     dfs(0, ns);     printf( %.10lf n , ans);     return 0;   }   