#include <bits/stdc++.h>
using namespace std;
float a[1000005] = {};
int main() {
  int n, n1, n2, k = 1;
  cin >> n >> n1 >> n2;
  for (int i = 0; i < n; i++) cin >> a[i];
  sort(a, a + n);
  float sum = 0, cal = 0;
  if (n1 < n2) k = 0;
  float p = min(n1, n2);
  int h = 0, l = 0;
  for (int i = n - 1; h < p; i--) {
    sum = sum + a[i];
    h++;
    k = i;
  }
  sum = sum / p;
  p = max(n1, n2);
  for (int i = k - 1; l < p; i -= 1) {
    cal = cal + a[i];
    l++;
  }
  cal = cal / p;
  cal = cal + sum;
  cout << fixed;
  cout << setprecision(8) << cal << endl;
}
