#include <bits/stdc++.h>
using namespace std;
int a[100001];
bool cmp(const int &a, const int &b) { return a > b; }
int main() {
  int n, n1, n2;
  double temp = 0, ans = 0;
  scanf("%d %d %d", &n, &n1, &n2);
  for (int i = 0; i < n; i++) {
    scanf("%d", &a[i]);
  }
  int max = n1 > n2 ? n1 : n2;
  int min = n1 > n2 ? n2 : n1;
  sort(a, a + n, cmp);
  for (int i = 0; i < min; i++) {
    temp += a[i];
  }
  ans += temp / min;
  temp = 0;
  for (int i = min; i < max + min; i++) {
    temp += a[i];
  }
  ans += temp / max;
  printf("%.8lf\n", ans);
  return 0;
}
