#include <bits/stdc++.h>
using namespace std;
const int maxn = 200000;
int n, n1, n2;
int a[maxn];
int main() {
  cin >> n >> n1 >> n2;
  for (int i = 1; i <= n; i++) cin >> a[i];
  if (n1 < n2) swap(n1, n2);
  sort(a + 1, a + n + 1);
  double tong1 = 0, tong2 = 0;
  for (int i = n; i >= n - n2 + 1; i--) {
    tong1 = tong1 + a[i];
  }
  for (int i = (n - n2); i >= (n - n2) - n1 + 1; i--) tong2 = tong2 + a[i];
  double tong11 = tong1 / n2, tong22 = tong2 / n1;
  double tong = tong11 + tong22;
  cout << fixed << setprecision(8) << tong;
}
