#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int t, i, j, n, n1, n2;
  cin >> n >> n1 >> n2;
  long long int a[n + 1];
  for (i = 0; i < n; i++) cin >> a[i];
  sort(a, a + n);
  double sum11, sum22, sum1 = 0, sum2 = 0, count1 = 0, count2 = 0;
  for (i = n - 1;; i--) {
    if (count1 == n1) {
      sum2 += a[i];
      count2++;
    } else {
      sum1 += a[i];
      count1++;
    }
    if (count1 == n1 && count2 == n2) break;
  }
  sum1 = sum1 / n1;
  sum2 = sum2 / n2;
  sum11 = sum1 + sum2;
  sum1 = sum2 = 0;
  count1 = 0;
  count2 = 0;
  for (i = n - 1;; i--) {
    if (count2 == n2) {
      sum1 += a[i];
      count1++;
    } else {
      sum2 += a[i];
      count2++;
    }
    if (count1 == n1 && count2 == n2) break;
  }
  sum1 = sum1 / n1;
  sum2 = sum2 / n2;
  sum22 = sum1 + sum2;
  sum1 = max(sum11, sum22);
  cout << fixed;
  cout << setprecision(8);
  cout << sum1 << endl;
}
