#include <bits/stdc++.h>
using namespace std;
int a[100100];
bool cmp(const int &a, const int &b) { return a > b; }
int main() {
  int n, n1, n2, i;
  cin >> n >> n1 >> n2;
  for (i = 0; i < n; i++) scanf("%d", a + i);
  sort(a, a + n, cmp);
  int tp = min(n1, n2);
  double res = 0;
  double sum = 0;
  for (i = 0; i < tp; i++) sum += a[i];
  res = sum / tp;
  sum = 0;
  for (i = tp; i < n1 + n2; i++) sum += a[i];
  res += sum / (n1 + n2 - tp);
  printf("%.8f\n", res);
}
