#include <bits/stdc++.h>
using namespace std;
int main() {
  double n1, n2, a[100005], n1p, n2p;
  int n, i, j;
  double sum1, sum2, avg1, avg2, avg;
  cin >> n >> n1 >> n2;
  n1p = n1;
  n2p = n2;
  for (i = 0; i < n; i++) {
    cin >> a[i];
  }
  sort(a, a + n);
  int x, y;
  if (n1 >= n2) {
    x = n2;
    y = n1;
  } else {
    x = n1;
    y = n2;
  }
  sum1 = 0;
  sum2 = 0;
  j = n - 1;
  int t1, t2;
  t1 = x;
  t2 = y;
  while (x > 0) {
    sum1 += a[j];
    j--;
    x--;
  }
  while (y > 0) {
    sum2 += a[j];
    j--;
    y--;
  }
  avg1 = sum1 / t1;
  avg2 = sum2 / t2;
  avg = avg1 + avg2;
  printf("%.8f", avg);
  return 0;
}
