let dp = Array.make_matrix (50 + 1) (50 + 1) ~-1
let rec c n k = if dp.(n).(k) > -1 then dp.(n).(k) else (dp.(n).(k) <- if n < k then 0 else if n = k then 1 else if k = 0 then 1 else c (n - 1) (k - 1) + c (n - 1) k; dp.(n).(k))
let n, a, b = Scanf.scanf " %d %d %d" @@ fun a b c -> a, b - 1, c - 1
let vs = Array.init n @@ fun _ -> Scanf.scanf " %d" (+) 0
let m = Array.(sort (fun x y -> y - x) vs; vs.(0))
let j, k = ref ~-1, ref (b + 1)
let _ = Array.(iteri (fun i v -> if a <= i && i < !k && v < m then k := i; if i > 0 && i <= b && v <> vs.(i - 1) then j := i) vs; if a < !k then decr k;
  Printf.printf "%.6f\n%d\n" (float (sub vs 0 (!k + 1) |> fold_left (+) 0) /. (float !k +. 1.)) @@ if vs.(!k) = m then 1 lsl (!k + 1) - 1 else c (fold_left (fun c v -> if v = vs.(!k) then c + 1 else c) 0 vs) (!k - !j + 1))