#include <bits/stdc++.h>
using namespace std;
long long a[100009];
int i;
int main() {
  int n;
  long long n1, n2;
  cin >> n >> n1 >> n2;
  for (i = 0; i < n; i++) {
    cin >> a[i];
  }
  long long s1 = 0, s2 = 0;
  sort(a, a + n);
  reverse(a, a + n);
  if (n1 > n2) {
    swap(n1, n2);
  }
  for (i = 0; i < n1; i++) {
    s1 += a[i];
  }
  for (i = n1; i < n2 + n1; i++) {
    s2 += a[i];
  }
  double ans = ((double)s1 / n1) + ((double)s2 / n2);
  printf("%.6f", ans);
  return 0;
}
