#include <bits/stdc++.h>
using namespace std;
bool UDgreater(int el, int el2) { return el > el2; }
int main() {
  int n, n1, n2;
  cin >> n >> n1 >> n2;
  vector<int> vec;
  for (int i = 0; i < n; i++) {
    int j;
    cin >> j;
    vec.push_back(j);
  }
  sort(vec.begin(), vec.end(), UDgreater);
  int min_s = min(n1, n2);
  int max_s = max(n1, n2);
  int sumJ = n1 + n2;
  double sum11 = 0;
  double sum12 = 0;
  double sum21 = 0;
  double sum22 = 0;
  for (int i = 0; i < min_s; i++) {
    sum11 += vec[i];
    sum22 += vec[i];
  }
  for (int i = min_s; i < max_s; i++) {
    sum22 += vec[i];
  }
  for (int i = min_s; i < sumJ; i++) {
    sum12 += vec[i];
  }
  for (int i = max_s; i < sumJ; i++) {
    sum21 += vec[i];
  }
  sum11 = sum11 / min_s;
  sum12 = sum12 / max_s;
  sum21 = sum21 / min_s;
  sum22 = sum22 / max_s;
  double Ans1 = sum11 + sum12;
  double Ans2 = sum21 + sum22;
  printf("%.8f", max(Ans1, Ans2));
  return 0;
}
