let lower_bound f a =
  let rec loop l r =
    if l >= r then r
    else let m = (l+r) / 2 in if f a.(m) then loop l m else loop (m+1) r
  in loop 0 (Array.length a)

let comb =
  let memo = Array.make_matrix 55 55 (-1) in
  let rec f n k =
    if memo.(n).(k) >= 0 then memo.(n).(k)
    else
      let v = if k = 0 || n = k then 1 else f (n-1) k + f (n-1) (k-1) in
      memo.(n).(k) <- v; v
  in f

let () =
  Scanf.scanf "%d %d %d" @@ fun n a b ->
  let vs = Array.init n (fun _ -> Scanf.scanf " %f" ((+.) 0.)) in
  Array.sort compare vs;

  let i0 = lower_bound ((<=) vs.(n-a)) vs in
  let i1 = lower_bound ((<) vs.(n-a)) vs in
  let avr =
    Array.init a (fun i -> vs.(n-1-i) /. float_of_int a)
    |> Array.fold_left (+.) 0.
  in
  let lc = i1 - (n-a)  and uc = i1 - i0 in
  begin if i1 = n then
    Array.init (uc-lc+1) (fun i -> comb uc (lc+i))
    |> Array.fold_left (+) 0
  else
    comb uc lc
  end
  |> Printf.printf "%.10f\n%d\n" avr
