#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, n1, n2;
  long double sum1 = 0, sum2 = 0;
  cin >> n >> n1 >> n2;
  double a[n];
  for (int t = 0; t < n; t++) {
    cin >> a[t];
  }
  sort(a, a + n);
  int i = n - 1;
  if (n1 < n2) {
    int t = n1;
    while (t != 0) {
      sum1 += a[i];
      i--;
      t--;
    }
    t = n2;
    while (t != 0) {
      sum2 += a[i];
      i--;
      t--;
    }
  } else {
    int t = n2;
    while (t != 0) {
      sum2 += a[i];
      i--;
      t--;
    }
    t = n1;
    while (t != 0) {
      sum1 += a[i];
      i--;
      t--;
    }
  }
  sum1 /= n1;
  sum2 /= n2;
  cout << setprecision(9) << sum1 + sum2;
  return 0;
}
