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