#include <bits/stdc++.h>
using namespace std;
priority_queue<long long, std::vector<long long>, std::greater<long long> > pqs;
queue<long long> qq;
stack<long long> sta;
set<long long> st;
set<long long>::iterator P;
pair<long long, long long> pp;
vector<long long> v;
map<long long, long long> mp, pm;
long long i, j, n, m, t, k, a, b, c, x, mx, mn;
string s, s1;
char z;
int main() {
  ios_base::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL);
  int T = 1;
  while (T--) {
    i = j = n = m = t = k = a = b = c = x = mx = mn = 0;
    cin >> n >> a >> b;
    long long A[n + 5];
    for (i = 0; i < n; i++) cin >> A[i];
    sort(A, A + n);
    j = n - (a + b);
    if (a < b) swap(a, b);
    long long aa = a, bb = b;
    double ans = 0.0, ans1 = 0.0, ans2 = 0.0;
    for (i = j; i < n; i++)
      if (aa)
        ans1 += A[i], aa--;
      else
        ans2 += A[i];
    ans = ans1 / a + ans2 / b;
    cout << fixed << setprecision(10) << ans << endl;
    ;
  }
  return 0;
}
