#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1e6 + 10;
long double a[MAXN];
int main() {
  int n;
  long double n1, n2;
  cin >> n >> n1 >> n2;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  sort(a, a + n);
  long double ans = 0;
  if (n1 > n2) swap(n1, n2);
  int i;
  for (i = n - 1; n - i <= n1; i--) {
    ans += a[i] / n1;
  }
  for (; n - i <= n1 + n2; i--) {
    ans += a[i] / n2;
  }
  cout << fixed << setprecision(10) << ans << endl;
  return 0;
}
