#include <bits/stdc++.h>
using namespace std;
const int mod = 7 + (int)1e9;
const int N = 1 + 1e5;
int a[N];
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int n, n1, n2;
  cin >> n >> n1 >> n2;
  double sum1 = 0, sum2 = 0;
  for (int i = 0; i < n; i++) cin >> a[i];
  sort(a, a + n);
  reverse(a, a + n);
  if (n1 > n2) {
    n1 = n1 + n2;
    n2 = n1 - n2;
    n1 = n1 - n2;
  }
  for (int i = 0; i < n1; i++) sum1 += a[i];
  for (int i = 0; i < n2; i++) sum2 += a[n1 + i];
  printf("%.8f\n", (sum1 / n1) + (sum2 / n2));
  return 0;
}
