#include <bits/stdc++.h>
using namespace std;
long long n, n1, n2, a[111111], sum1 = 0, sum2 = 0;
int main() {
  cin >> n >> n1 >> n2;
  for (int i = 0; i < n; i++) cin >> a[i];
  if (n1 > n2) swap(n1, n2);
  sort(a, a + n);
  reverse(a, a + n);
  int i = 0;
  int m1 = n1;
  int m2 = n2;
  while (m1 != 0) {
    sum1 += a[i];
    i++;
    m1--;
  }
  while (m2 != 0) {
    sum2 += a[i];
    i++;
    m2--;
  }
  cout << fixed << setprecision(7) << (sum1 * 1.0 / n1) + (sum2 * 1.0 / n2);
}
