#include <bits/stdc++.h>
using namespace std;
int chToIn(char a) {
  int b;
  b = a - '0';
  return b;
}
int stToIn(string a) {
  int b;
  b = atoi(a.c_str());
  return b;
}
string appendChar(string s, char a) {
  s.append(1, a);
  return s;
}
long long int ar[100005];
double s, ss;
int main() {
  int n;
  double n1, n2;
  int l1, l2;
  cin >> n >> n1 >> n2;
  l1 = n1;
  l2 = n2;
  for (int i = 0; i < n; i++) {
    cin >> ar[i];
    ar[i] *= -1;
  }
  sort(ar, ar + n);
  s = ss = 0;
  int tmp;
  tmp = min(l1, l2);
  l2 = max(l1, l2);
  l1 = tmp;
  for (int i = 0; i < l1; i++) {
    s += ar[i];
  }
  for (int i = l1; i < l1 + l2; i++) {
    ss += ar[i];
  }
  s *= -1.00;
  ss *= -1.00;
  n1 = l1;
  n2 = l2;
  s = (s / n1 + ss / n2);
  printf("%.8lf", s);
}
