#include <bits/stdc++.h>
using namespace std;
bool cmp(int a, int b) { return a > b; }
int main() {
  int a[100005];
  int n, n1, n2, i, j, t;
  long long sum1 = 0, sum2 = 0;
  scanf("%d%d%d", &n, &n1, &n2);
  for (i = 0; i < n; i++) scanf("%d", &a[i]);
  sort(a, a + n, cmp);
  if (n1 > n2) {
    t = n1;
    n1 = n2;
    n2 = t;
  }
  for (i = 0, j = 0; j < n1; i++, j++) {
    sum1 += a[i];
  }
  for (j = 0;; i++) {
    sum2 += a[i];
    j++;
    if (j == n1) break;
  }
  for (i++; j < n2; i++, j++) {
    sum2 += a[i];
  }
  printf("%.8f\n", 1.0 * sum1 / n1 + 1.0 * sum2 / n2);
  return 0;
}
