#include <bits/stdc++.h>
using namespace std;
const double PI = 3.1415926535897932384626433832795;
const long long INF = 1e18 + 7;
const double EPS = 1 / 1e9;
const long long MOD = 1000000007;
const int N = 100000;
using namespace std;
string s;
long long n;
long long ans = 0;
void solve() {
  vector<double> a;
  int n1, n2;
  cin >> n >> n1 >> n2;
  double s1, s2, x;
  for (int i = 0; i < n; i++) {
    cin >> x;
    a.push_back(x);
  }
  sort(a.begin(), a.end());
  double ans = 0;
  s1 = 0, s2 = 0;
  for (int i = 0; i < n1; i++) {
    s1 += a[n - 1 - i];
  }
  for (int i = 0; i < n2; i++) {
    s2 += a[n - 1 - n1 - i];
  }
  ans = s1 / n1 + s2 / n2;
  s1 = 0, s2 = 0;
  for (int i = 0; i < n2; i++) {
    s1 += a[n - 1 - i];
  }
  for (int i = 0; i < n1; i++) {
    s2 += a[n - 1 - n2 - i];
  }
  ans = max(ans, s1 / n2 + s2 / n1);
  cout.precision(7);
  cout << ans;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int k1 = 1;
  while (k1--) solve();
  return 0;
}
