#include <bits/stdc++.h>
using namespace std;
const long long inf = 1000000000000000000LL;
const double EPS = 1e-9;
const long long mod = 1000000007ll;
const int maxn = (int)100500 + 10;
int notPrime[maxn];
long long primes[maxn];
int pr_cnt;
int a[maxn];
int main() {
  int n, n1, n2;
  scanf("%d%d", &n, &n1), scanf("%d", &n2);
  for (int i = 0; i < (int)(n); ++i) scanf("%d", &a[i]);
  sort(a, a + n);
  int cur = n - 1;
  double ns1 = 0, ns2 = 0;
  if (n1 > n2) swap(n1, n2);
  int tn1 = n1, tn2 = n2;
  while ((n1--) > 0) ns1 += a[cur--];
  while ((n2--) > 0) ns2 += a[cur--];
  printf("%.9f", ns1 / (1. * tn1) + ns2 / (1. * tn2));
}
