#include <bits/stdc++.h>
using namespace std;
int cmp(int a, int b) { return a > b; }
int main() {
  int n, n1, n2;
  cin >> n >> n1 >> n2;
  int list[100005];
  int i, j, k;
  for (i = 0; i < n; i++) {
    cin >> list[i];
  }
  sort(list, list + n, cmp);
  int ma = max(n1, n2);
  int mi = min(n1, n2);
  long long sum1(0), sum2(0);
  for (int i = 0; i < mi; i++) sum1 += list[i];
  for (int i = mi; i < mi + ma; i++) sum2 += list[i];
  cout << setprecision(8) << fixed << double(sum1) / mi + double(sum2) / ma
       << endl;
  return 0;
}
