#include <bits/stdc++.h>
using namespace std;
int main() {
  double n1, n2;
  int a[100005], n, k;
  cin >> n >> n1 >> n2;
  for (int i = 0; i < n; i++) cin >> a[i];
  sort(a, a + n, greater<int>());
  double sum1 = 0, sum2 = 0, x, y;
  k = 0;
  for (int i = 0; i < n; i++) {
    if (i <= n1 - 1)
      sum1 += a[i];
    else if (k < n2)
      sum2 += a[i], k++;
  }
  x = (sum1 / n1) + (sum2 / n2);
  sum1 = 0, sum2 = 0, k = 0;
  for (int i = 0; i < n; i++) {
    if (i <= n2 - 1)
      sum1 += a[i];
    else if (k < n1)
      sum2 += a[i], k++;
  }
  y = (sum1 / n2) + (sum2 / n1);
  double ans = max(x, y);
  printf("%0.6f\n", ans);
}
