#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, n1, n2;
  cin >> n >> n1 >> n2;
  double wel[n];
  long long i;
  for (i = 0; i < n; i++) cin >> wel[i];
  sort(wel, wel + n);
  if (n1 > n2) {
    long long temp = n1;
    n1 = n2;
    n2 = temp;
  }
  double sum = 0.0, sum1 = 0.0;
  for (i = 0; i < n1; i++) {
    sum += (wel[n - 1 - i] * 1.0);
  }
  for (; i < n1 + n2; i++) {
    sum1 += (1.0 * wel[n - 1 - i]);
  }
  double ans1 = 0, ans2 = 0;
  double ans = (sum * 1.0) * n2 + (sum1 * 1.0) * n1;
  ans = ans / (n1 * n2 * 1.0);
  printf("%f", ans);
}
