#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, p1, p2, n1, n2, a;
  double sum1 = 0;
  double sum2 = 0;
  vector<int> v;
  cin >> n >> p1 >> p2;
  n1 = min(p1, p2);
  n2 = max(p1, p2);
  for (int i = 0; i < n; i++) {
    cin >> a;
    v.push_back(a);
  }
  sort(v.begin(), v.end());
  int cnt1 = 0;
  int cnt2 = 0;
  for (int i = v.size() - 1; i >= 0; i--) {
    sum1 += v[i];
    v.erase(v.begin() + i);
    cnt1++;
    if (cnt1 == n1) break;
  }
  for (int i = v.size() - 1; i >= 0; i--) {
    sum2 += v[i];
    cnt2++;
    if (cnt2 == n2) break;
  }
  cout << fixed << setprecision(5) << (sum1 / n1 + sum2 / n2);
}
