#include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 5;
int a[N];
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n, n1, n2;
  cin >> n >> n1 >> n2;
  long long sum = 0;
  double ans = 0;
  if (n1 > n2) swap(n1, n2);
  for (int i = 0; i < n; i++) cin >> a[i];
  sort(a, a + n);
  reverse(a, a + n);
  int i = 0;
  for (int j = 0; j < n1; j++) sum += a[i++];
  ans += (double)sum / n1;
  sum = 0;
  for (int j = 0; j < n2; j++) sum += a[i++];
  ans += (double)sum / n2;
  cout << fixed << setprecision(6) << ans << endl;
  return 0;
}
