#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int n, n1, n2;
  cin >> n >> n1 >> n2;
  vector<double> candidates;
  double a;
  for (int i = 0; i < n; i++) {
    cin >> a;
    candidates.push_back(a);
  }
  sort(candidates.begin(), candidates.end(), greater<double>());
  int x, y;
  x = min(n1, n2);
  y = max(n1, n2);
  long double sum_x = 0;
  long double sum_y = 0;
  int current = 0;
  while (x + y) {
    if (x) {
      sum_x = sum_x + candidates[current];
      x--;
    } else {
      sum_y = sum_y + candidates[current];
      y--;
    }
    current++;
  }
  cout << fixed << setprecision(8)
       << (sum_x / min(n1, n2)) + (sum_y / max(n1, n2));
}
