#include <bits/stdc++.h>
using namespace std;
int n, n1, n2;
double a[100005];
int main() {
  scanf("%d %d %d", &n, &n1, &n2);
  for (int i = 1; i <= n; i++) scanf("%lf", &a[i]);
  sort(a + 1, a + 1 + n);
  int now = n;
  if (n1 < n2) swap(n1, n2);
  double sum1 = 0, sum2 = 0;
  for (int i = 1; i <= n2; i++) {
    sum1 += a[now];
    now--;
  }
  sum1 = sum1 / n2;
  for (int i = 1; i <= n1; i++) {
    sum2 += a[now];
    now--;
  }
  sum2 = sum2 / n1;
  printf("%.8f\n", sum1 + sum2);
  return 0;
}
