#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, n1, n2, k, ara[100001];
  scanf("%d%d%d", &n, &n1, &n2);
  double ans = 0;
  if (n1 > n2) swap(n1, n2);
  for (int i = 0; i < n; i++) scanf("%d", &ara[i]);
  sort(ara, ara + n);
  long long c1 = 0, c2 = 0, x = n1, y = n2;
  int i = n - 1;
  while (n1 != 0) {
    c1 += ara[i];
    n1--;
    i--;
  }
  ans = (double)c1 / x;
  while (n2 != 0) {
    c2 += ara[i];
    n2--;
    i--;
  }
  ans += (double)c2 / y;
  printf("%.8lf", ans);
  return 0;
}
