#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, n1, n2;
  cin >> n >> n1 >> n2;
  int *a;
  a = new int[n];
  for (int i = 0; i < n; i++) cin >> a[i];
  sort(a, a + n);
  float ans1 = 0;
  int min = n1 < n2 ? n1 : n2, max = n1 > n2 ? n1 : n2;
  for (int i = n - 1; i > n - min - 1; i--) {
    ans1 += a[i];
  }
  float ans2 = 0;
  for (int i = n - min - 1; i > n - min - max - 1; i--) {
    ans2 += a[i];
  }
  float ans = ans1 / min + ans2 / max;
  printf("%.6f\n", ans);
  return 0;
}
