#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, n1, n2;
  cin >> n;
  cin >> n1;
  cin >> n2;
  int a[n];
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  sort(a, a + n, std::greater<int>());
  double r1;
  double r2;
  if (n1 > n2) {
    int i = 0;
    for (i = 0; i < n2; i++) r1 += (double)a[i];
    for (int j = i; j < i + n1; j++) r2 += (double)a[j];
    cout << std::setprecision(7) << (r1 / (double)n2) + (r2 / (double)n1)
         << endl;
    return 0;
  } else {
    int i = 0;
    for (i = 0; i < n1; i++) r1 += (double)a[i];
    for (int j = i; j < i + n2; j++) r2 += (double)a[j];
    cout << std::setprecision(7) << (r1 / (double)n1) + (r2 / (double)n2)
         << endl;
    return 0;
  }
  return 0;
}
