#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, n1, n2, max1, min1;
  cin >> n >> n1 >> n2;
  int arr[n];
  for (int i = 0; i < n; i++) {
    cin >> arr[i];
  }
  sort(arr, arr + n, greater<int>());
  min1 = min(n1, n2);
  max1 = max(n1, n2);
  double s = 0, s1 = 0;
  for (int i = 0; i < min1; i++) {
    s += arr[i];
  }
  for (int i = min1; i < (min1 + max1); i++) {
    s1 += arr[i];
  }
  cout << fixed << setprecision(8) << s / min1 + s1 / max1 << "\n";
  return 0;
}
