import Data.List
import Text.Printf
main = getLine >>= main' . map read . words
    where
        main' [_, a, b] = getLine >>= main'' a b . sortBy (flip compare) . map read . words
        main'' a b vs = printf "%.6f\n" ave >> print (solve a b v vs)
            where
                xs = take a vs
                (s, v) = foldl' (\(acc, _) x -> (acc + x, x)) (0, 0) xs
                ave = s / fromIntegral a

solve :: Int -> Int -> Double -> [Double] -> Int
solve a b v xxs@(x : _)
    | v == x = sum . take (min b cn - a + 1) . drop a $ pascal cn
    | otherwise = head . drop (a - an) $ pascal vn
    where
        cn = length $ takeWhile (v ==) xxs

        (as, bs) = span (v <) xxs
        an = length as
        vn = length $ takeWhile (v ==) bs

pascal :: Int -> [Int]
pascal n = build 0 [1]
    where
        build m xs
            | n == m = xs
            | otherwise = build (m + 1) $ nextPascal xs

nextPascal :: [Int] -> [Int]
nextPascal = next . (0 :)
    where
        next (x : y : zs) = (x + y) : next (y : zs)
        next xs = xs
