func_code_string: #include <bits/stdc++.h>   using namespace std;   const int N = 1000000;   double ans, T, sumb, sumc;   int n, nb, nc;   struct node {     double x, y;     bool operator<(const node &a) const { return y < a.y; }   } a[N], b[N], c[N];   int main() {     scanf( %d%lf , &n, &T);     for (int i = 1; i <= n; i++) scanf( %lf , &a[i].x);     for (int i = 1; i <= n; i++) scanf( %lf , &a[i].y);     sort(a + 1, a + 1 + n);     for (int i = 1; i <= n; i++)       if (a[i].y < T)         b[++nb] = (node){a[i].x, T - a[i].y}, sumb = sumb + b[nb].x * b[nb].y;       else if (a[i].y == T)         ans = ans + a[i].x;       else if (a[i].y > T)         c[++nc] = (node){a[i].x, a[i].y - T}, sumc = sumc + c[nc].x * c[nc].y;     for (int i = 1; i < nb / 2; i++) swap(b[i], b[nb - i + 1]);     double x = min(sumb, sumc);     for (int i = 1; i <= nb; i++)       if (x > 1e-12) {         double y = min(b[i].x, x / b[i].y);         ans += y;         x -= y * b[i].y;       }     x = min(sumb, sumc);     for (int i = 1; i <= nc; i++)       if (x > 1e-12) {         double y = min(c[i].x, x / c[i].y);         ans += y;         x -= y * c[i].y;       }     printf( %.12lf n , ans);     return 0;   }   