#include <bits/stdc++.h>
using namespace std;
int main() {
  std::vector<int> rn;
  int k, i, a, b, c;
  double val, s1, s2;
  cin >> a;
  cin >> b;
  cin >> c;
  if (b > c) {
    swap(b, c);
  }
  for (i = 0; i < a; i++) {
    cin >> k;
    rn.push_back(k);
  }
  sort(rn.begin(), rn.end());
  reverse(rn.begin(), rn.end());
  val = 0;
  for (i = 0; i < b; i++) {
    s1 = s1 + double(rn[i]);
  }
  val = val + s1 / b;
  for (i = b; i < b + c; i++) {
    s2 = s2 + double(rn[i]);
  }
  val = val + s2 / c;
  double h = 1.939;
  printf("%0.8lf", val);
  cout << endl;
  return 0;
}
