#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, n1, n2;
  cin >> n >> n1 >> n2;
  double a[n];
  for (int i = 0; i < n; i++) cin >> a[i];
  sort(a, a + n);
  double ans1 = 0, ans2 = 0;
  int s = 0;
  s = n - n1 - n2;
  if (n1 > n2) {
    for (int i = s; i < n1 + s; i++) ans1 += a[i];
    for (int i = n1 + s; i <= n; i++) ans2 += a[i];
    ans1 /= n1;
    ans2 /= n2;
  } else {
    for (int i = s; i < n2 + s; i++) ans1 += a[i];
    for (int i = n2 + s; i <= n; i++) ans2 += a[i];
    ans1 /= n2;
    ans2 /= n1;
  }
  double ans = ans1 + ans2;
  printf("%.9f", ans);
}
