#include <bits/stdc++.h>
using namespace std;
int r[100001];
int main() {
  int n, n1, n2;
  scanf("%d %d %d", &n, &n1, &n2);
  for (int i = 0; i < n; i++) scanf("%d", &r[i]);
  sort(r, r + n);
  double res;
  unsigned long long sum = 0;
  if (n1 > n2) {
    for (int i = 0; i < n2; i++) {
      sum += r[n - 1 - i];
    }
    res += (double)sum / n2;
    sum = 0;
    for (int i = 0; i < n1; i++) {
      sum += r[n - 1 - n2 - i];
    }
    res += (double)sum / n1;
  } else {
    for (int i = 0; i < n1; i++) {
      sum += r[n - 1 - i];
    }
    res += (double)sum / n1;
    sum = 0;
    for (int i = 0; i < n2; i++) {
      sum += r[n - 1 - n1 - i];
    }
    res += (double)sum / n2;
  }
  printf("%.8f", res);
  return 0;
}
