#include <bits/stdc++.h>
using namespace std;
template <typename Arg1>
void __f(const char* name, Arg1&& arg1) {
  cerr << name << " : " << arg1 << std::endl;
}
template <typename Arg1, typename... Args>
void __f(const char* names, Arg1&& arg1, Args&&... args) {
  const char* comma = strchr(names + 1, ',');
  cerr.write(names, comma - names) << " : " << arg1 << " | ";
  __f(comma + 1, args...);
}
const int INF = 0x3f3f3f3f;
const int MAXN = 1e5 + 7;
long long a[MAXN];
int main() {
  int n, n1, n2;
  cin >> n >> n1 >> n2;
  int mn = min(n1, n2);
  int mx = max(n1, n2);
  for (int i = 0; i < n; i++) cin >> a[i];
  sort(a, a + n);
  for (int i = 1; i <= n - 1; i++) {
    a[i] += a[i - 1];
  }
  double ans = (double)(a[n - 1] - a[n - mn - 1]) / (double)mn +
               (double)(a[n - mn - 1] - a[n - mn - mx - 1]) / (double)mx;
  printf("%.9f\n", ans);
  return 0;
}
