#include <bits/stdc++.h>
using namespace std;
int a[1000010];
double sum1, sum2;
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);
  for (int i = n - 1; i >= n - n1; i--) {
    sum1 += a[i];
  }
  for (int i = n - n1 - 1; i >= n - n1 - n2; i--) {
    sum2 += a[i];
  }
  sum1 /= n1;
  sum2 /= n2;
  cout << setprecision(8) << fixed << (sum1 + sum2);
  return 0;
}
