#include <bits/stdc++.h>
using namespace std;
double a[100010], ans1, ans2;
int n, n1, n2;
bool cmp(double a, double b) { return a > b; }
int main() {
  scanf("%d%d%d", &n, &n1, &n2);
  if (n1 > n2) swap(n1, n2);
  for (int i = 1; i <= n; i++) scanf("%lf", &a[i]);
  sort(a + 1, a + n + 1, cmp);
  for (int i = 1; i <= n1; i++) ans1 += a[i];
  for (int i = n1 + 1; i <= n1 + n2; i++) ans2 += a[i];
  printf("%.8f\n", ans1 / n1 + ans2 / n2);
  return 0;
}
