#include <bits/stdc++.h>
using namespace std;
int n, n1, n2, a[100007], k, i, j, sz;
long double ans = 0.0;
int main() {
  while (cin >> n >> n1 >> n2) {
    for (i = 0; i <= n - 1; i++) scanf("%d", a + i);
    sort(a, a + n);
    if (n1 > n2) swap(n1, n2);
    long long sum = 0, n3 = n1, n4 = n2;
    for (i = n - 1; i >= 0; i--) {
      if (n1 == 0) break;
      sum += a[i];
      n1--;
    }
    ans += (long double)sum / n3;
    sum = 0;
    for (i = i; i >= 0; i--) {
      if (n2 == 0) break;
      sum += a[i];
      n2--;
    }
    ans += (long double)sum / n4;
    cout << setprecision(7) << ans << '\n';
  }
  return 0;
}
