#include <bits/stdc++.h>
using namespace std;
void base() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
}
void solve() {
  int n, n1, n2;
  cin >> n >> n1 >> n2;
  priority_queue<double> pq;
  for (int i = 0; i < n; ++i) {
    int x;
    cin >> x;
    pq.push(x);
  }
  if (n1 > n2) swap(n1, n2);
  double s1 = 0, s2 = 0;
  for (int i = 0; i < n1; ++i) {
    s1 += pq.top();
    pq.pop();
  }
  for (int i = 0; i < n2; ++i) {
    s2 += pq.top();
    pq.pop();
  }
  cout << fixed << setprecision(12) << s1 / n1 + s2 / n2 << "\n";
}
int main() {
  base();
  int t = 1;
  while (t--) {
    solve();
  }
  return 0;
}
