#include <bits/stdc++.h>
using namespace std;
const double EPS = 1e-9;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  priority_queue<double> q1, q2;
  int n, n1, n2;
  double s1 = 0, s2 = 0, ans1, ans2, ans, v;
  cin >> n >> n1 >> n2;
  for (int i = 0; i < n; i++) {
    cin >> v;
    q1.push(v);
    q2.push(v);
  }
  for (int i = 0; i < n1; i++) {
    s1 += q1.top();
    q1.pop();
  }
  for (int i = 0; i < n2; i++) {
    s2 += q1.top();
    q1.pop();
  }
  ans1 = (s1 / (n1 * 1.0)) + (s2 / (n2 * 1.0));
  s1 = 0, s2 = 0;
  for (int i = 0; i < n2; i++) {
    s1 += q2.top();
    q2.pop();
  }
  for (int i = 0; i < n1; i++) {
    s2 += q2.top();
    q2.pop();
  }
  ans2 = (s1 / n2) + (s2 / n1);
  ans = max(ans1, ans2);
  cout << fixed << setprecision(6) << ans;
}
