#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, n1, n2;
  scanf("%d%d%d", &n, &n1, &n2);
  if (n1 > n2) swap(n1, n2);
  vector<double> X;
  double x;
  for (int i = 0; i < n; i++) {
    scanf("%lf", &x);
    X.push_back(x);
  }
  sort(X.begin(), X.end());
  double sum1 = 0, sum2 = 0;
  for (int i = n - n1 - n2; i < n; i++) {
    if (i < n - n1)
      sum2 += X[i];
    else
      sum1 += X[i];
  }
  sum1 /= n1;
  sum2 /= n2;
  printf("%.8lf", sum1 + sum2);
  return 0;
}
