#include <bits/stdc++.h>
using namespace std;
const int MAX_N = 100010;
long long n, n1, n2;
long long a[MAX_N];
int main() {
  ios_base::sync_with_stdio(0);
  cin >> n >> n1 >> n2;
  if (n1 < n2) {
    long long tmp = n1;
    n1 = n2;
    n2 = tmp;
  }
  for (int i = 0; i < n; i++) cin >> a[i];
  sort(a, a + n);
  long long suma = 0, sumb = 0;
  for (long long i = n - 1; i >= n - n2; i--) sumb += a[i];
  for (long long i = n - n2 - 1; i >= n - n2 - n1; i--) suma += a[i];
  cout << fixed << setprecision(9) << float(suma * n2 + sumb * n1) / (n1 * n2)
       << endl;
  return 0;
}
