#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 5;
int a[maxn];
int n, n1, n2;
bool cmp(int a, int b) { return a > b; }
int main(void) {
  while (~scanf("%d %d %d", &n, &n1, &n2)) {
    if (n1 > n2) swap(n1, n2);
    for (int i = 0; i < n; ++i) scanf("%d", a + i);
    sort(a, a + n, cmp);
    long long t1 = 0, t2 = 0;
    for (int i = 0; i < n1; ++i) t1 += a[i];
    for (int i = n1; i < n1 + n2; ++i) t2 += a[i];
    double sum = t1 * 1.0 / n1 + t2 * 1.0 / n2;
    printf("%.8lf\n", sum);
  }
  return 0;
}
