#include <bits/stdc++.h>
using namespace std;
long long int arr[100010];
int main() {
  long long int i, j, k, m, n, n1, n2;
  double ans = 0.0, ans2 = 0.0;
  cin >> n >> n1 >> n2;
  for (i = 0; i < n; i++) {
    cin >> arr[i];
  }
  sort(arr, arr + n);
  j = 0;
  if (n1 < n2) swap(n1, n2);
  for (i = n - 1;; i--) {
    j++;
    ans += arr[i];
    if (j == n2) break;
  }
  ans = ans / (n2 + 0.0);
  k = n - n2 - 1;
  m = 0;
  j = 0;
  for (i = k;; i--) {
    j++;
    m += arr[i];
    if (j == n1) break;
  }
  ans2 = (m + 0.0) / (n1 + 0.0);
  printf("%.8lf\n", ans + ans2);
}
