#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, i;
  long long int n1, n2;
  long double s = 0;
  cin >> n >> n1 >> n2;
  long double a[n];
  for (i = 0; i < n; i++) cin >> a[i];
  sort(a, a + n);
  long double ans1 = 0, ans2 = 0;
  if (n1 > n2) swap(n1, n2);
  for (int i = n - n1; i < n; i++) {
    ans1 += a[i];
  }
  for (int i = n - n1 - n2; i < n - n1; i++) {
    ans2 += a[i];
  }
  cout << fixed << setprecision(8) << (double)ans1 / n1 + (double)ans2 / n2;
}
