#include <bits/stdc++.h>
using namespace std;
int main() {
  vector<int> vet;
  int n, n1, n2, a, mini, maxi;
  cin >> n >> n1 >> n2;
  for (int i = 0; i < n; i++) {
    cin >> a;
    vet.push_back(a);
  }
  sort(vet.rbegin(), vet.rend());
  double sum1, sum2;
  sum1 = sum2 = 0;
  mini = min(n1, n2);
  maxi = max(n1, n2);
  int indice = 0;
  for (int i = 1; i <= mini; i++) {
    sum1 += vet[indice];
    indice++;
  }
  for (int i = 1; i <= maxi; i++) {
    sum2 += vet[indice];
    indice++;
  }
  double m1 = (double)sum1 / mini;
  double m2 = (double)sum2 / maxi;
  cout << fixed << setprecision(8) << m1 + m2 << endl;
}
