#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int n, n1, n2, ar[100005] = {0}, sum1 = 0, sum2 = 0, sum = 0;
  cin >> n >> n1 >> n2;
  for (int i = 0; i < n; ++i) {
    cin >> ar[i];
  }
  sort(ar, ar + n);
  if (n2 < n1) n1 ^= n2 ^= n1 ^= n2;
  for (int i = n - 1; i >= n - n1 - n2; i--) {
    if (i >= n - n1)
      sum1 += ar[i];
    else
      sum2 += ar[i];
  }
  sum = sum1 * n2 + sum2 * n1;
  cout << setprecision(10) << fixed << double(double(sum) / double(n1 * n2));
  return 0;
}
