#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, n1, n2;
  cin >> n >> n1 >> n2;
  int a[n], i;
  for (i = 0; i < n; i++) cin >> a[i];
  long long int k, j, s1 = 0, s2 = 0;
  sort(a, a + n);
  if (n1 < n2) {
    for (i = 0; i < n1; i++) {
      s1 += a[n - 1 - i];
    }
    for (j = 0; j < n2; j++) {
      s2 += a[n - 1 - i - j];
    }
  } else {
    for (i = 0; i < n2; i++) {
      s2 += a[n - 1 - i];
    }
    for (j = 0; j < n1; j++) {
      s1 += a[n - 1 - i - j];
    }
  }
  float m1, m2;
  m1 = s1 * 1.0 / n1;
  m2 = s2 * 1.0 / n2;
  printf("%f\n", m1 + m2);
  return 0;
}
