#include <bits/stdc++.h>
using namespace std;
const int N = 2005;
const double eps = 1e-9;
template <typename T>
void read(T &x) {
  x = 0;
  int f = 1;
  char c = getchar();
  for (; !isdigit(c); c = getchar())
    if (c == '-') f = -1;
  for (; isdigit(c); c = getchar()) x = (x << 1) + (x << 3) + c - '0';
  x *= f;
}
int n, A, B;
double a[N], b[N];
double f[N];
int cnta[N], cntb[N];
double ans;
void check(double ca, double cb) {
  for (int i = 1; i <= n; i++) {
    f[i] = f[i - 1];
    cnta[i] = cnta[i - 1];
    cntb[i] = cntb[i - 1];
    if (f[i] < f[i - 1] + a[i] - ca - eps) {
      f[i] = f[i - 1] + a[i] - ca;
      cnta[i] = cnta[i - 1] + 1;
      cntb[i] = cntb[i - 1];
    }
    if (f[i] < f[i - 1] + b[i] - cb - eps) {
      f[i] = f[i - 1] + b[i] - cb;
      cnta[i] = cnta[i - 1];
      cntb[i] = cntb[i - 1] + 1;
    }
    if (f[i] < f[i - 1] + a[i] - ca + b[i] - cb - a[i] * b[i] - eps) {
      f[i] = f[i - 1] + a[i] - ca + b[i] - cb - a[i] * b[i];
      cnta[i] = cnta[i - 1] + 1;
      cntb[i] = cntb[i - 1] + 1;
    }
  }
}
int main() {
  read(n), read(A), read(B);
  for (int i = 1; i <= n; i++) scanf("%lf", &a[i]);
  for (int i = 1; i <= n; i++) scanf("%lf", &b[i]);
  double l = 0, r = 1, L = 0, R = 1;
  while (r - l > eps) {
    double mid = (l + r) / 2;
    L = 0, R = 1;
    while (R - L > eps) {
      double MID = (L + R) / 2;
      check(mid, MID);
      if (cntb[n] <= B)
        R = MID;
      else
        L = MID;
    }
    check(mid, R);
    if (cnta[n] <= A)
      r = mid;
    else
      l = mid;
  }
  check(r, R);
  printf("%lf\n", f[n] + A * r + B * R);
  return 0;
}
