#include <bits/stdc++.h>
using namespace std;
long long n, n1, n2;
vector<long long> v;
int32_t main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> n1 >> n2;
  for (long long u, i = 0; i < n; i++) {
    cin >> u;
    v.push_back(u);
  }
  sort(v.begin(), v.end());
  if (n1 > n2) swap(n1, n2);
  double ans, ans2;
  for (long long i = 0; i < n1; i++) {
    ans += v[v.size() - 1];
    v.pop_back();
  }
  for (long long i = 0; i < n2; i++) {
    ans2 += v[v.size() - 1];
    v.pop_back();
  }
  double ansk = (ans / (double)n1) + (ans2 / (double)n2);
  return cout << setprecision(6) << fixed << ansk << '\n', 0;
}
