#include <bits/stdc++.h>
using namespace std;
bool cmp(int a, int b) { return a > b; }
int main() {
  int n, n1, n2;
  while (~scanf("%d%d%d", &n, &n1, &n2)) {
    int a[100005];
    for (int i = 0; i < n; i++) {
      scanf("%d", &a[i]);
    }
    sort(a, a + n, cmp);
    if (n1 < n2) swap(n1, n2);
    double ans, ans1 = 0, ans2 = 0;
    for (int i = 0; i < n2; i++) {
      ans2 += double(a[i]);
    }
    for (int j = n2; j < n1 + n2; j++) {
      ans1 += double(a[j]);
    }
    ans = ans1 / n1 + ans2 / n2;
    printf("%llf\n", ans);
  }
}
