#include <bits/stdc++.h>
using namespace std;
long long gcd(long long x, long long y) { return x == 0 ? y : gcd(y % x, x); }
long long lcm(long long x, long long y) { return x / gcd(x, y) * y; }
int fx[] = {1, -1, 0, 0};
int fy[] = {0, 0, 1, -1};
long long big_mod(long long a, long long p) {
  if (p == 0) return 1LL;
  long long ret = big_mod(a, p / 2);
  ret = ((ret * ret) % 1000000009 + 1000000009) % 1000000009;
  if (p % 2) ret = ((ret * a) % 1000000009 + 1000000009) % 1000000009;
  return ret;
}
int main() {
  double n, n1, n2, sum = 0, t, t1;
  cin >> n >> n1 >> n2;
  priority_queue<double> pq;
  while (n--) {
    int a;
    cin >> a;
    pq.push(a);
  }
  t1 = min(n1, n2);
  t = t1;
  while (t--) {
    sum += pq.top();
    pq.pop();
  }
  double ans = 0;
  ans += (double)(sum / t1);
  sum = 0;
  t = max(n1, n2);
  t1 = t;
  while (t--) {
    sum += pq.top();
    pq.pop();
  }
  ans += (double)(sum / t1);
  printf("%.10lf", ans);
  return 0;
}
