#include <bits/stdc++.h>
using namespace std;
int main(int argc, char *argv[]) {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  int N, N1, N2;
  cin >> N >> N1 >> N2;
  vector<int> A;
  A.reserve(N);
  for (int i = 0; i < N; ++i) {
    int a;
    cin >> a;
    A.push_back(a);
  }
  sort(A.begin(), A.end());
  long long weightedWealthSum = 0;
  long long minN = min(N1, N2);
  long long maxN = max(N1, N2);
  for (int i = N - N1 - N2; i < N - minN; ++i) {
    weightedWealthSum += minN * ((long long)A[i]);
  }
  for (int i = N - minN; i < N; ++i) {
    weightedWealthSum += maxN * ((long long)A[i]);
  }
  cout << fixed;
  cout << setprecision(8);
  cout << ((double)weightedWealthSum) / ((double)minN * maxN) << endl;
  return 0;
}
