#include <bits/stdc++.h>
using namespace std;
int v[100005];
int main() {
  long long n, i, a, b, sum = 0;
  double total = 0;
  cin >> n >> a >> b;
  for (i = 1; i <= n; ++i) cin >> v[i];
  if (a > b) swap(a, b);
  sort(v + 1, v + n + 1, greater<int>());
  for (i = 1; i <= a; ++i) {
    sum += v[i];
  }
  total = 1.0 * sum / a;
  sum = 0;
  for (i = a + 1; i <= a + b; ++i) {
    sum += v[i];
  }
  total += 1.0 * sum / b;
  cout << fixed << setprecision(8) << total;
  return 0;
}
