#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, n1, n2;
  cin >> n >> n1 >> n2;
  int A[n], i;
  for (i = 0; i < n; ++i) cin >> A[i];
  sort(A, A + n, std::greater<int>());
  int a, b;
  if (n1 < n2) {
    a = n1;
    b = n2;
  } else {
    a = n2;
    b = n1;
  }
  double ans1 = 0, ans2 = 0;
  for (i = 0; i < a; ++i) ans1 += A[i];
  ans1 = ans1 / (double)a;
  for (; i < a + b; ++i) ans2 += A[i];
  ans2 = ans2 / (double)b;
  printf("%.8lf\n", ans1 + ans2);
}
