import Control.Monad
import qualified Data.ByteString.Char8 as C
import Data.List
import Data.Ord
import Numeric

main = C.interact $ put . sol . get

get = fmap (unfoldr (C.readInteger . C.dropWhile (==' '))) . C.lines

put = C.pack . unlines

sol [[n,a,b],vs] = [showFFloat (Just 6) ave "",show cnt]
  where
  as = genericTake a $ sortBy (flip compare) vs
  v = last as
  x = genericLength $ filter (==v) as
  y = genericLength $ filter (==v) vs
  ave = fromIntegral (sum as)/fromIntegral a
  cnt = if x==a
    then sum $ binom y <$> [x..min y b]
    else binom y x

binom :: Integer -> Integer -> Integer
binom = loop 1 1
  where
  loop fn fk _ 0 = fn `div` fk
  loop _  _  0 _ = 0
  loop fn fk n k = loop (fn*n) (fk*k) (n-1) (k-1)