#include <bits/stdc++.h>
using namespace std;
int cmp(int a, int b) { return a > b; }
int main() {
  int n, n1, n2, a[111111], i, j, k;
  while (~scanf("%d%d%d", &n, &n1, &n2)) {
    double num1 = 0, num2 = 0;
    for (i = 0; i < n; i++) {
      scanf("%d", &a[i]);
    }
    sort(a, a + n, cmp);
    int max = n1 > n2 ? n1 : n2;
    int min = n1 > n2 ? n2 : n1;
    for (i = 0; i < min; i++) {
      num1 += a[i];
    }
    num1 = (num1 * 1.0) / min;
    for (i = min; i < max + min; i++) {
      num2 += a[i];
    }
    num2 = (num2 * 1.0) / max;
    printf("%.8lf\n", num1 + num2);
  }
  return 0;
}
