from math import factorial

N,A,B = list(map(int,input().split()))

V = sorted(list(map(int,input().split())),reverse=True)

C = {}

for i in range(N):

    if V[i] not in C:

        C[V[i]] = 0

    C[V[i]] += 1

v = V[A-1]

avg = sum(V[:A])/A

print(avg)

cnt = V[:A].count(v)

if cnt<A:

    tot = factorial(C[v])//factorial(cnt)//factorial(C[v]-cnt)

else:#cnt==A

    tot = 0

    for j in range(A,min(B,C[v])+1):

        tot += factorial(C[v])//factorial(j)//factorial(C[v]-j)

print(tot)
memo = {}

def f(m,k):

    if k>m:

        return 0

    if m==1:

        return 1

    if k==0:

        return 1

    if k==1:

        return m

    if (m,k) in memo:

        return memo[(m,k)]

    memo[(m,k)]=f(m-1,k-1)+f(m-1,k)

    return memo[(m,k)]



N,A,B = list(map(int,input().split()))

V = sorted(list(map(int,input().split())),reverse=True)

amin = 10**15+10

for i in range(A):

    amin = min(amin,V[i])

av = sum(V[:A])/A

cnt = 0

for i in range(N):

    if V[i]==amin:

        cnt += 1

cntB = 0

for i in range(B):

    if V[i]==amin:

        cntB += 1

cntA = 0

for i in range(A):

    if V[i]==amin:

        cntA += 1

print(av)

if V[0]>amin:

    print((f(cnt,cntA)))

else:

    tot = 0

    for i in range(cntA,cntB+1):

        tot += f(cnt,i)

    print(tot)
from math import factorial

N, A, B = list(map(int, input().split()))
V = sorted(list(map(int, input().split())), reverse=True)
C = {}
for i in range(N):
    if V[i] not in C:
        C[V[i]] = 0
    C[V[i]] += 1
v = V[A - 1]
avg = sum(V[:A]) / A
print(avg)
cnt = V[:A].count(v)
if cnt < A:
    tot = factorial(C[v]) // factorial(cnt) // factorial(C[v] - cnt)
else:  # cnt==A
    tot = 0
    for j in range(A, min(B, C[v]) + 1):
        tot += factorial(C[v]) // factorial(j) // factorial(C[v] - j)
print(tot)

memo = {}


def f(m, k):
    if k > m:
        return 0
    if m == 1:
        return 1
    if k == 0:
        return 1
    if k == 1:
        return m
    if (m, k) in memo:
        return memo[(m, k)]
    memo[(m, k)] = f(m - 1, k - 1) + f(m - 1, k)
    return memo[(m, k)]


N, A, B = list(map(int, input().split()))
V = sorted(list(map(int, input().split())), reverse=True)
amin = 10**15 + 10
for i in range(A):
    amin = min(amin, V[i])
av = sum(V[:A]) / A
cnt = 0
for i in range(N):
    if V[i] == amin:
        cnt += 1
cntB = 0
for i in range(B):
    if V[i] == amin:
        cntB += 1
cntA = 0
for i in range(A):
    if V[i] == amin:
        cntA += 1
print(av)
if V[0] > amin:
    print((f(cnt, cntA)))
else:
    tot = 0
    for i in range(cntA, cntB + 1):
        tot += f(cnt, i)
    print(tot)

-from math import factorial +memo = {} + + +def f(m, k): +    if k > m: +        return 0 +    if m == 1: +        return 1 +    if k == 0: +        return 1 +    if k == 1: +        return m +    if (m, k) in memo: +        return memo[(m, k)] +    memo[(m, k)] = f(m - 1, k - 1) + f(m - 1, k) +    return memo[(m, k)] + -C = {} +amin = 10**15 + 10 +for i in range(A): +    amin = min(amin, V[i]) +av = sum(V[:A]) / A +cnt = 0 -    if V[i] not in C: -        C[V[i]] = 0 -    C[V[i]] += 1 -v = V[A - 1] -avg = sum(V[:A]) / A -print(avg) -cnt = V[:A].count(v) -if cnt < A: -    tot = factorial(C[v]) // factorial(cnt) // factorial(C[v] - cnt) -else:  # cnt==A +    if V[i] == amin: +        cnt += 1 +cntB = 0 +for i in range(B): +    if V[i] == amin: +        cntB += 1 +cntA = 0 +for i in range(A): +    if V[i] == amin: +        cntA += 1 +print(av) +if V[0] > amin: +    print((f(cnt, cntA))) +else: -    for j in range(A, min(B, C[v]) + 1): -        tot += factorial(C[v]) // factorial(j) // factorial(C[v] - j) -print(tot) +    for i in range(cntA, cntB + 1): +        tot += f(cnt, i) +    print(tot)