#include <bits/stdc++.h>
using namespace std;
namespace thecold {
const int Max_n = 2e3 + 5;
const double eps = 1e-8;
double p[Max_n], u[Max_n], c[Max_n];
int n, a, b, cnta, cntb;
double ansa, ansb, ans;
bool useda, usedb, tha, thb;
inline void check(const double costa, const double costb) {
  cnta = cntb = ans = 0;
  for (int i = 1; i <= n; ++i) {
    double tmp = 0;
    useda = usedb = false;
    if (p[i] - costa >= tmp + eps)
      tmp = p[i] - costa, useda = true, usedb = false;
    if (u[i] - costb >= tmp + eps)
      tmp = u[i] - costb, useda = false, usedb = true;
    if (c[i] - costa - costb >= tmp + eps)
      tmp = c[i] - costa - costb, useda = true, usedb = true;
    if (useda) ++cnta;
    if (usedb) ++cntb;
    ans += tmp;
  }
}
inline void 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", u + i);
  for (int i = 1; i <= n; ++i) c[i] = 1.0 - (1.0 - p[i]) * (1.0 - u[i]);
  double la = 0, ra = 1;
  while (ra - la >= -eps) {
    double mida = (ra + la) / 2.0, lb = 0, rb = 1;
    tha = thb = false;
    while (rb - lb >= -eps) {
      double midb = (lb + rb) / 2.0;
      check(mida, midb);
      ansb = midb;
      if (cntb == b) break;
      if (cntb > b)
        lb = midb + eps;
      else
        rb = midb - eps;
    }
    ansa = mida;
    if (cnta == a) break;
    if (cnta > a)
      la = mida + eps;
    else
      ra = mida - eps;
  }
  ans += ansa * a + ansb * b;
  printf("%.4lf", ans);
}
}  // namespace thecold
int main() {
  thecold::main();
  return 0;
}
