#include <bits/stdc++.h>
using namespace std;
int n, n1, n2, x[100001];
double s, s2, k, l;
int main() {
  cin >> n >> n1 >> n2;
  for (int i = 1; i <= n; i++) {
    cin >> x[i];
  }
  sort(x + 1, x + n + 1);
  int d = min(n1, n2);
  int t = max(n1, n2);
  double k = min(n1, n2), l = max(n1, n2);
  for (int i = n; i >= 1; i--) {
    if (d > 0) {
      d--;
      s += x[i];
    } else if (t > 0) {
      t--;
      s2 += x[i];
    }
  }
  double ans = s / k + s2 / l;
  cout << fixed << setprecision(8) << ans;
}
