#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e6 + 7;
int main() {
  int n, n1, n2;
  priority_queue<int> q;
  scanf("%d%d%d", &n, &n1, &n2);
  while (n--) {
    int temp;
    scanf("%d", &temp);
    q.push(temp);
  }
  if (n1 < n2) {
    int temp = n1;
    n1 = n2;
    n2 = temp;
  }
  int tempn1 = n1, tempn2 = n2;
  long long int sum1 = 0;
  long long int sum2 = 0;
  while (n2--) {
    int temp = q.top();
    sum1 += temp;
    q.pop();
  }
  while (n1--) {
    int temp = q.top();
    sum2 += temp;
    q.pop();
  }
  double ans1 = sum1 * 1.0 / (tempn2 * 1.0);
  double ans2 = sum2 * 1.0 / (tempn1 * 1.0);
  printf("%.8lf", ans1 + ans2);
  return 0;
}
