#include <bits/stdc++.h>
using namespace std;
int main() {
  double n, n1, n2;
  cin >> n >> n1 >> n2;
  if (n1 > n2) {
    double t = n1;
    n1 = n2;
    n2 = t;
  }
  vector<double> arr(n);
  for (int i = 0; i < n; i++) cin >> arr[i];
  sort(arr.rbegin(), arr.rend());
  int i;
  double ans = 0, res = 0;
  for (i = 0; i < n1; i++) ans += arr[i];
  for (; i < n1 + n2; i++) res += arr[i];
  ans = ans / n1;
  ans += (res / n2);
  cout << setprecision(12) << fixed << ans;
}
