program main
    implicit none
    integer:: n,a,b, i,j,k, c1,c2
    double precision, allocatable:: v(:)
    double precision:: ave, mnum
    character(1000):: cmnum

    read*, n, a, b
    allocate(v(n))
    read*, v(1:n)
    ! print*, "#1"
    call sort(v(1:n))
    ! print*, "#2"

    ave = dble(sum(v(n-a+1:n)))/dble(a)
    ! print*, "#3"
    
    c1 = count(v(1:n) == v(n-a+1))

    if (v(n-a+1) /= v(n-a)) then
        !  print*, "#4.1"
        c2 = count(v(n-a+1:n) == v(n-a+1))
        mnum = comb(c1,c2)
    else
        !  print*, "#4.2"
        c2 = min(c1,b)
        mnum = 0.d0
        do i = a, c2
            mnum = mnum + comb(c1,i)
        end do
    end if
    
    ! print*, c1,c2
    print'(f0.7)', ave
    write(cmnum,'(f0.0)') mnum
    print'(A)', cmnum(1:len_trim(cmnum)-1)

    

contains
function comb(n,m) result(ret)
    implicit none
    integer, intent(in):: n,m
    integer::i, end
    double precision, allocatable:: dp(:), ndp(:)
    double precision:: ret
    end = n + 1
    allocate(dp(0:end), ndp(0:end))
    dp(:) = 0.d0; ndp(:) = 0.d0
    dp(1) = 1.d0; ndp(1) = 1.d0
    do i = 1, n
        ndp(1:end) = ndp(1:end) + dp(0:end-1) 
        dp(1:end) = ndp(1:end)
    end do
    ret = dp(m+1)
end function


subroutine sort(arr)
    implicit none
    integer:: i,j
    double precision,intent(inout):: arr(:)

    do i = 1,size(arr)
        do j = i, size(arr)
            if (arr(j) >= arr(i)) cycle
            call swap(arr(i), arr(j))
        end do
    end do
end subroutine

subroutine swap(a,b)
    implicit none
    double precision, intent(inout):: a,b
    double precision:: c
    c=a; a=b; b=c
end subroutine

end program