#include <bits/stdc++.h>
using namespace std;
const int maxn = 100111;
int n, n1, n2;
double s1, s2, a[maxn];
int main() {
  scanf("%d%d%d", &n, &n1, &n2);
  for (int i = 0; i < n; i++) scanf("%lf", &a[i]);
  sort(a, a + n, greater<int>());
  if (n1 < n2) {
    for (int i = 0; i < n1; i++) s1 += a[i];
    for (int i = n1; i < n1 + n2; i++) s2 += a[i];
  } else {
    for (int i = 0; i < n2; i++) s2 += a[i];
    for (int i = n2; i < n2 + n1; i++) s1 += a[i];
  }
  double res = s1 / n1 + s2 / n2;
  printf("%.8lf\n", res);
  return 0;
}
