#include <bits/stdc++.h>
using namespace std;
const int MAX = 100002;
int a[MAX];
int main() {
  int n, n1, n2;
  cin >> n >> n1 >> n2;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  if (n1 > n2) swap(n1, n2);
  sort(a, a + n);
  int k = n - 1;
  double ans = 0.0;
  for (int i = 0; i < n1; i++) {
    ans += (double)a[k--];
  }
  ans /= n1;
  double sum = 0.0;
  for (int i = 0; i < n2; i++) {
    sum += (double)a[k--];
  }
  sum /= n2;
  ans += sum;
  printf("%.8f\n", ans);
  return 0;
}
