#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, n1, n2, i;
  cin >> n >> n1 >> n2;
  int a[n];
  for (i = 0; i < n; i++) {
    cin >> a[i];
  }
  sort(a, a + n);
  if (n1 > n2) {
    int t = n1;
    n1 = n2;
    n2 = t;
  }
  double ans1 = 0, ans2 = 0;
  for (i = 0; i < n1; i++) {
    ans1 = ans1 + a[n - 1 - i];
  }
  ans1 = ans1 / n1;
  for (i = 0; i < n2; i++) {
    ans2 = ans2 + a[n - 1 - n1 - i];
  }
  ans2 = ans2 / n2;
  printf("%.6f", ans1 + ans2);
}
