#include <bits/stdc++.h>
const int MAXN = 2005;
const double EPS = 1e-9;
int N, A, B;
double p[MAXN], u[MAXN];
int cntA, cntB;
double ans;
void solve(double costA, double costB) {
  cntA = cntB = 0;
  ans = 0;
  for (int i = 0; i < N; ++i) {
    double a = p[i] - costA;
    double b = u[i] - costB;
    double c = p[i] + u[i] - p[i] * u[i] - costA - costB;
    if (a > 0 && a >= b && a >= c)
      ans += a, ++cntA;
    else if (b > 0 && b >= a && b >= c)
      ans += b, ++cntB;
    else if (c > 0 && c >= a && c >= b)
      ans += c, ++cntA, ++cntB;
  }
}
int main() {
  scanf("%d%d%d", &N, &A, &B);
  for (int i = 0; i < N; ++i) scanf("%lf", p + i);
  for (int i = 0; i < N; ++i) scanf("%lf", u + i);
  double lA = 0, rA = 1, lB, rB;
  while (rA - lA > EPS) {
    double mA = (lA + rA) / 2;
    lB = 0, rB = 1;
    while (rB - lB > EPS) {
      double mB = (lB + rB) / 2;
      solve(mA, mB);
      if (cntB < B)
        rB = mB;
      else
        lB = mB;
    }
    if (cntA < A)
      rA = mA;
    else
      lA = mA;
  }
  printf("%.6f\n", ans + A * lA + B * lB);
  return 0;
}
