#include <bits/stdc++.h>
int arr[100004];
int main() {
  int n, n1, n2;
  std::cin >> n >> n1 >> n2;
  for (int i = 0; i < n; ++i) {
    std::cin >> arr[i];
  }
  std::sort(arr, arr + n, [](int a, int b) { return a > b; });
  if (n1 > n2) {
    int temp = n2;
    n2 = n1;
    n1 = temp;
  }
  long long sum1 = 0, sum2 = 0;
  int i = 0;
  for (i = 0; i < n1; ++i) {
    sum1 += arr[i];
  }
  for (; i < n1 + n2; ++i) {
    sum2 += arr[i];
  }
  double x1 = (double)sum1 / n1;
  double x2 = (double)sum2 / n2;
  fprintf(stdout, "%.8lf", x1 + x2);
  return 0;
}
