#include <bits/stdc++.h>
using namespace std;
const int mxn = 1e5 + 5;
int n, n1, n2;
double a[mxn], ans, x, y, z;
int main() {
  cin >> n >> n1 >> n2;
  for (int i = 1; i <= n; i++) cin >> a[i];
  sort(a + 1, a + n + 1);
  int i = n;
  for (int cnt = min(n1, n2); cnt > 0; i--, cnt--) {
    x += a[i];
  }
  x /= min(n1, n2);
  for (int cnt = max(n1, n2); cnt > 0; i--, cnt--) {
    y += a[i];
  }
  y /= max(n1, n2);
  cout << setprecision(10) << fixed << x + y << "\n";
}
