#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, n1, n2;
  cin >> n >> n1 >> n2;
  int a[n];
  for (int i = 0; i < n; i++) cin >> a[i];
  sort(a, a + n);
  cout << fixed << setprecision(15);
  double sum1 = 0, sum2 = 0;
  int k, i = n - 1;
  for (; i >= n - min(n1, n2); i--) sum1 += a[i];
  for (k = i; i > k - max(n1, n2); i--) sum2 += a[i];
  cout << 1.0 * sum1 / min(n1, n2) + 1.0 * sum2 / max(n1, n2);
}
