#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, n1, n2, arr[100050];
  long long int sum[100050] = {0};
  scanf("%d %d %d", &n, &n1, &n2);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &arr[i]);
  }
  int nn = min(n1, n2);
  sort(arr + 1, arr + n + 1);
  reverse(arr + 1, arr + n + 1);
  for (int i = 1; i <= n; i++) {
    sum[i] = sum[i - 1] + arr[i];
  }
  double arith = 0.0, sum1 = 0.0, sum2 = 0.0;
  for (int i = 1; nn-- > 0; i++) sum1 = sum1 + (arr[i] * 1.0);
  sum2 = (sum[n1 + n2] * 1.0) - sum1;
  arith = sum1 / (min(n1, n2)) + sum2 / (max(n1, n2));
  printf("%0.8f\n", arith);
  return 0;
}
