#include <bits/stdc++.h>
using namespace std;
bool cmp(int a, int b) {
  if (a > b) return true;
  return false;
}
int main() {
  int n, n1, n2, l;
  double s = 0, w = 0;
  vector<double> a;
  cin >> n >> n1 >> n2;
  cout << fixed << setprecision(8);
  if (n1 < n2) swap(n1, n2);
  for (int i = 0; i < n; i++) {
    cin >> l;
    a.push_back(l);
  }
  sort(a.begin(), a.end(), cmp);
  for (int i = 0; i < n2; i++) {
    s += a[i] / n2;
  }
  for (int i = n2; i < n2 + n1; i++) {
    w += a[i] / n1;
  }
  cout << s + w;
  return 0;
}
