#include <bits/stdc++.h>
using namespace std;
long long n, A, B;
long double a[((long long)2100)], b[((long long)2100)];
pair<long double, long long> dp[((long long)2100)][((long long)2100)];
bool check(long double x) {
  for (int i = 1; i <= n; i++)
    for (int j = 0; j <= A; j++) {
      pair<long double, long long> ex;
      dp[i][j] = dp[i - 1][j];
      ex = {dp[i - 1][j - 1].first + a[i], dp[i - 1][j - 1].second};
      if (j && ex > dp[i][j]) dp[i][j] = ex;
      ex = {dp[i - 1][j].first + b[i] - x, dp[i - 1][j].second - 1};
      if (ex > dp[i][j]) dp[i][j] = ex;
      ex = {dp[i - 1][j - 1].first + a[i] + b[i] - a[i] * b[i] - x,
            dp[i - 1][j - 1].second - 1};
      if (j && ex > dp[i][j]) dp[i][j] = ex;
    }
  return (-dp[n][A].second >= B);
}
int main() {
  cin >> n >> A >> B;
  for (int i = 1; i <= n; i++) cin >> a[i];
  for (int i = 1; i <= n; i++) cin >> b[i];
  long double l = 0, r = 2;
  for (int i = 0; i < 60; i++) {
    long double mid = (l + r) / 2;
    if (check(mid))
      l = mid;
    else
      r = mid;
  }
  check(l);
  cout << fixed << setprecision(14)
       << (long double)dp[n][A].first + (long double)B * l << "\n";
  return 0;
}
