#include <bits/stdc++.h>
using namespace std;
void solve() {
  long long int n, n1, n2, num, den;
  cin >> n >> n1 >> n2;
  vector<long long int> a(n);
  for (auto &n : a) cin >> n;
  ;
  sort(a.begin(), a.end(), greater<long long int>());
  if (n1 > n2) swap(n1, n2);
  long long int s = accumulate(a.begin(), a.begin() + n1 + n2, 0ll);
  long long int s1 = accumulate(a.begin(), a.begin() + n1, 0ll);
  num = n1 * s + (n2 - n1) * s1;
  den = n1 * n2;
  cout << fixed << setprecision(10) << 1.0 * num / den;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  solve();
}
