#include <bits/stdc++.h>
using namespace std;
int n, n1, n2, a[100010], min1, max1;
double sum, sum1, sum2;
int main() {
  cin >> n >> n1 >> n2;
  for (int i = 0; i < n; i++) cin >> a[i];
  sort(a, a + n);
  min1 = min(n1, n2);
  max1 = max(n1, n2);
  int j = n - 1;
  for (int i = 1; i <= min1; i++) {
    sum1 += a[j];
    j--;
  }
  for (int i = 1; i <= max1; i++) {
    sum2 += a[j];
    j--;
  }
  sum = sum1 / min1 + sum2 / max1;
  cout << setprecision(8) << fixed << sum;
  return 0;
}
