#include <bits/stdc++.h>
using namespace std;
double ans, a[100003], x, y;
int n;
int main() {
  cin >> n >> x >> y;
  if (x > y) swap(x, y);
  for (int i = 0; i < n; i++) cin >> a[i];
  sort(a, a + n);
  reverse(a, a + n);
  for (int i = 0; i < x; i++) ans += a[i] * y;
  for (int i = x; i < x + y; i++) ans += a[i] * x;
  cout << fixed << setprecision(7) << ans / (x * y) << endl;
  return 0;
}
