#include <bits/stdc++.h>
using namespace std;
int a[200005];
bool cmp(int q, int p) { return q > p; }
int main() {
  int i, n, n1, n2;
  double ans1 = 0, ans2 = 0;
  cin >> n >> n1 >> n2;
  for (i = 0; i < n; i++) cin >> a[i];
  sort(a, a + n, cmp);
  if (n1 > n2) swap(n1, n2);
  for (i = 0; i < n1; i++) {
    ans1 += a[i];
  }
  ans1 /= n1;
  for (i = n1; i < n1 + n2; i++) {
    ans2 += a[i];
  }
  ans2 /= n2;
  printf("%.8f", ans1 + ans2);
  return 0;
}
