#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int n, n1, n2, s = 0, s1 = 0;
  scanf("%lld %lld %lld", &n, &n1, &n2);
  long long int a[n + 1];
  double c;
  for (int i = 0; i < n; i++) {
    scanf("%lld", &a[i]);
  }
  sort(a, a + n);
  if (n1 > n2) {
    swap(n1, n2);
  }
  int i, j;
  for (i = n - 1, j = 0; j < n1; i--, j++) {
    s += a[i];
  }
  for (j = 0; j < n2; i--, j++) {
    s1 += a[i];
  }
  double ans = ((double)s / (double)n1);
  ans += ((double)s1 / (double)n2);
  printf("%f", ans);
  return 0;
}
