#include <bits/stdc++.h>
using namespace std;
int main(int argc, char** argv) {
  ios_base::sync_with_stdio(false);
  int32_t n, n1, n2;
  cin >> n >> n1 >> n2;
  if (n1 > n2) swap(n1, n2);
  int32_t a[n];
  for (int32_t i = 0; i < n; ++i) {
    cin >> a[i];
  }
  stable_sort(a, a + n);
  reverse(a, a + n);
  int64_t sum1 = 0, sum2 = 0;
  int32_t n1_n2 = n1 + n2;
  int32_t k = 0;
  for (; k < n1; ++k) {
    sum1 += a[k];
  }
  for (; k < n1_n2; ++k) {
    sum2 += a[k];
  }
  double res = ((double)sum1) / n1 + ((double)sum2) / n2;
  cout << std::fixed << std::setprecision(9) << res << endl;
  return 0;
}
