#include <bits/stdc++.h>
using namespace std;
void solve(), solve1();
int main(int argc, const char* argv[]) {
  srand((unsigned int)time(0));
  ios::sync_with_stdio(0);
  cin.tie(0);
  ;
  solve();
  return 0;
}
long long mod = 1e9;
long long inf = 2 * 1e18;
long long n;
vector<long long> a(n);
void solve() {
  long long n, n1, n2;
  cin >> n >> n1 >> n2;
  vector<long long> a(n);
  for (long long i = 0; i < n; i++) cin >> a[i];
  sort(a.begin(), a.end());
  reverse(a.begin(), a.end());
  long double ans = 0;
  long double sum1 = 0;
  long double sum2 = 0;
  for (long long i = 0; i < n1 + n2; i++) {
    if (i >= n1) {
      sum2 += a[i];
    } else
      sum1 += a[i];
  }
  ans = sum1 / n1 + sum2 / n2;
  sum1 = sum2 = 0;
  for (long long i = 0; i < n1 + n2; i++) {
    if (i >= n2) {
      sum2 += a[i];
    } else
      sum1 += a[i];
  }
  ans = max(ans, sum1 / n2 + sum2 / n1);
  cout << fixed << setprecision(7) << ans;
}
