#include <bits/stdc++.h>
using namespace std;
int n, A, B;
double P[101010], Q[101010];
double dp[101010];
int uA[101010], uB[101010];
signed main() {
  scanf("%d%d%d", &n, &A, &B);
  for (int i = 1; i <= n; i++) {
    scanf("%lf", &P[i]);
  }
  for (int i = 1; i <= n; i++) {
    scanf("%lf", &Q[i]);
  }
  double lba = 0, rba = 1.01, lbb, rbb, mida, midb;
  while (rba - lba > 1e-10) {
    mida = (lba + rba) / 2;
    lbb = 0, rbb = 1.01;
    while (rbb - lbb > 1e-10) {
      midb = (lbb + rbb) / 2;
      for (int i = 1; i <= n; i++) {
        dp[i] = dp[i - 1], uA[i] = uA[i - 1], uB[i] = uB[i - 1];
        if (dp[i] < dp[i - 1] - mida + P[i] ||
            (fabs(-dp[i] + dp[i - 1] - mida + P[i]) < 1e-10 &&
             (uA[i] > uA[i - 1] + 1 ||
              (uA[i] == uA[i - 1] + 1 && uB[i] > uB[i - 1])))) {
          dp[i] = dp[i - 1] - mida + P[i], uA[i] = uA[i - 1] + 1,
          uB[i] = uB[i - 1];
        }
        if (dp[i] < dp[i - 1] - midb + Q[i] ||
            (fabs(-dp[i] + dp[i - 1] - midb + Q[i]) < 1e-10 &&
             (uA[i] > uA[i - 1] ||
              (uA[i] == uA[i - 1] && uB[i] > uB[i - 1] + 1)))) {
          dp[i] = dp[i - 1] - midb + Q[i], uA[i] = uA[i - 1],
          uB[i] = uB[i - 1] + 1;
        }
        if (dp[i] < dp[i - 1] - midb - mida - P[i] * Q[i] + P[i] + Q[i] ||
            (fabs(-dp[i] + dp[i - 1] - midb - mida - P[i] * Q[i] + P[i] +
                  Q[i]) < 1e-10 &&
             (uA[i] > uA[i - 1] + 1 ||
              (uA[i] == uA[i - 1] + 1 && uB[i] > uB[i - 1] + 1)))) {
          dp[i] = dp[i - 1] - midb - mida - P[i] * Q[i] + P[i] + Q[i],
          uA[i] = uA[i - 1] + 1, uB[i] = uB[i - 1] + 1;
        }
      }
      if (uB[n] == B)
        break;
      else if (uB[n] < B)
        rbb = midb;
      else
        lbb = midb;
    }
    if (uA[n] == A)
      break;
    else if (uA[n] < A)
      rba = mida;
    else
      lba = mida;
  }
  printf("%.10lf", dp[n] + A * mida + B * midb);
  return 0;
}
