#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  long long int n, n1, n2;
  cin >> n >> n1 >> n2;
  long long int a[n];
  for (long long int I = 0; I < n; I += 1) cin >> a[I];
  sort(a, a + n);
  long long int sum = n1 + n2;
  n1 = sum - min(n1, n2);
  n2 = sum - n1;
  double res = 0;
  reverse(a, a + n);
  for (long long int I = 0; I < n2; I += 1) {
    res += a[I];
  }
  res /= n2;
  long long int resh = 0;
  for (long long int I = n2; I < n2 + n1; I += 1) {
    resh += a[I];
  }
  res += (double)resh / n1;
  cout << fixed << setprecision(6) << res;
}
