#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long int n, n1, n2, c, b;
  cin >> n >> n1 >> n2;
  c = n1;
  b = n2;
  long double sum = 0, sum1 = 0;
  long long int a[n];
  for (int i = 0; i < n; i++) cin >> a[i];
  sort(a, a + n);
  if (n1 >= n2) {
    long long int i = 0;
    while (b > 0) {
      sum += a[n - i - 1];
      i++;
      b--;
    }
    sum = sum / n2;
    while (c > 0) {
      sum1 += a[n - i - 1];
      i++;
      c--;
    }
    sum1 = sum1 / n1;
    cout << fixed << setprecision(8) << sum + sum1 << endl;
  } else {
    long long int i = 0;
    while (c > 0) {
      sum += a[n - i - 1];
      i++;
      c--;
    }
    sum = sum / n1;
    while (b > 0) {
      sum1 += a[n - i - 1];
      i++;
      b--;
    }
    sum1 = sum1 / n2;
    cout << fixed << setprecision(8) << sum + sum1 << endl;
  }
  return 0;
}
