#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) {
  if (!b) return a;
  return gcd(b, a % b);
}
long long power(long long x, long long y, long long p) {
  long long res = 1;
  x %= p;
  while (y > 0) {
    if (y & 1) res = (res * x) % p;
    y = y >> 1;
    x = (x * x) % p;
  }
  return res;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  {
    long long n, n1, n2;
    cin >> n >> n1 >> n2;
    long long a[n];
    for (int i = 0; i < n; i++) {
      cin >> a[i];
    }
    sort(a, a + n, greater<long long>());
    long long nn = min(n1, n2);
    long long nnn = max(n1, n2);
    n1 = nn, n2 = nnn;
    double s1 = 0, s2 = 0;
    for (int i = 0; i < n1; i++) {
      s1 += a[i];
    }
    for (int i = n1; i < n1 + n2; i++) {
      s2 += a[i];
    }
    s1 = s1 / n1;
    s2 /= n2;
    cout << fixed << setprecision(8) << (s1 + s2) << "\n";
  }
  return 0;
}
