#include <bits/stdc++.h>
using namespace std;
int main() {
  double n, n1, n2;
  scanf("%lf %lf %lf", &n, &n1, &n2);
  vector<double> income(n);
  for (int i = 0; i < n; i++) {
    scanf("%lf", &income[i]);
  }
  sort(income.begin(), income.end());
  double large, small;
  if (n1 > n2) {
    large = n1;
    small = n2;
  } else {
    large = n2;
    small = n1;
  }
  double sum = 0, sum1 = 0, sum2 = 0;
  for (int i = income.size() - 1; i >= income.size() - small; i--) {
    sum1 += income[i];
  }
  sum1 /= small;
  for (int i = income.size() - 1 - small; i >= income.size() - small - large;
       i--) {
    sum2 += income[i];
  }
  sum2 /= large;
  sum = sum1 + sum2;
  printf("%.08lf\n", sum);
}
