#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, n1, n2;
  cin >> n >> n1 >> n2;
  vector<long long> a;
  for (long long i = 0; i < n; i++) {
    long long temp;
    cin >> temp;
    a.push_back(temp);
  }
  sort(a.begin(), a.end());
  reverse(a.begin(), a.end());
  float ans1 = 0, ans2 = 0;
  for (long long i = 0; i < (min(n1, n2)); i++) {
    ans1 += float(a[i]);
  }
  long long c = 0;
  for (long long i = (min(n1, n2)); i < n; i++) {
    if (c == max(n1, n2)) {
      break;
    }
    ans2 += float(a[i]);
    c++;
  }
  cout << fixed << setprecision(6)
       << (ans1 / float(min(n1, n2))) + (ans2 / float(max(n1, n2)));
}
