#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, n1, n2, sum1 = 0, sum2 = 0;
  double ans = 0;
  cin >> n >> n1 >> n2;
  long long a[n];
  for (long long i = 0; i < n; i++) cin >> a[i];
  sort(a, a + n);
  reverse(a, a + n);
  long long x = min(n1, n2);
  long long y = max(n1, n2);
  for (long long i = 0; i < x; i++) {
    sum1 += a[i];
  }
  ans += sum1 * (1.0) / x;
  for (long long i = x; i < x + y; i++) {
    sum2 += a[i];
  }
  ans += sum2 * (1.0) / y;
  printf("%.6f\n", ans);
}
