#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  double a = 0, b = 0;
  cin >> n;
  double arr[n + 5], ab[3];
  for (int i = 0; i < 2; i++) cin >> ab[i];
  for (int i = 0; i < n; i++) cin >> arr[i];
  sort(ab, ab + 2);
  sort(arr, arr + n);
  for (int i = n - 1; i >= 0; i--) {
    if (i >= n - ab[0])
      a += arr[i];
    else if (i >= n - ab[0] - ab[1])
      b += arr[i];
  }
  cout << fixed << setprecision(8) << a / ab[0] + b / ab[1];
  return 0;
}
