#include <bits/stdc++.h>
using namespace std;
int main() {
  long long t1, n1, n2;
  cin >> t1 >> n1 >> n2;
  long long arr[t1];
  priority_queue<long long> pq;
  for (long long i = 0; i < t1; i++) {
    cin >> arr[i];
    pq.push(arr[i]);
  }
  if (n1 > n2) {
    long long p = n2;
    n2 = n1;
    n1 = p;
  }
  long long c = 0;
  long long s = 0;
  while (c < n1) {
    c++;
    s += pq.top();
    pq.pop();
  }
  double s1 = s / (n1 * 1.0);
  ;
  c = 0;
  s = 0;
  while (c < n2) {
    c++;
    s += pq.top();
    pq.pop();
  }
  double s2 = s / (n2 * 1.0);
  double ss = s1 + s2;
  printf("%.8f", ss);
  return 0;
}
