#include <bits/stdc++.h>

// limit
#define mod1 22439423LL
#define mod2 42342432LL
#define mod3 56454765LL
#define mod4 66867574LL
#define oo 1000000007LL
#define OO 1000000000000000007LL
#define maxN 2000007

// loop
#define fto(i, x, y) for(int i = (x); i <= (y); ++i)
#define fdto(i, x, y) for(int i = (x); i >= (y); --i)
#define ftoa(i, x, y, a) for(int i = (x); i <= (y); i += a)
#define fdtoa(i, x, y, a) for(int i = (x); i >= (y); i -= a)
#define ftosqrt(i, x, y) for(int i = (x); i*i <= (y); ++i)
#define ftoit(it, var) for (__typeof(var.begin()) it = var.begin(); it != var.end(); ++it)
#define fdtoit(rit, var) for (__typeof(var.rbegin()) rit = var.rbegin(); rit != var.rend(); ++rit)

// debug
#define debug cout << "*" << endl;
#define bug1d(a, x, y) { cout << #a << ": "; fto(_, x, y) cout << a[_] << ' '; cout << endl; }
#define bug2d(a, x, y, u, v) { cout << #a << ": " << endl; fto(i, x, y) {fto(j, u, v) cout << a[i][j] << ' '; cout << endl;}; cout << endl;}
#define bug(a) cout << #a << " = " << a << endl;
#define bug2(a, b) cout << #a << " = " << a << "; "; cout << #b << " = " << b << endl;
#define bug3(a, b, c) cout << #a << " = " << a << "; "; cout << #b << " = " << b << "; "; cout << #c << " = " << c << endl;

// operation
#define mp make_pair
#define pb push_back
#define pf push_front
// structure
#define ii pair<int, int>
#define vi vector<int>
#define vll vector<ll>
#define vii vector<ii>
#define matrix vector<vll>

// get value
#define FF first
#define SS second

// data type
#define ll long long
#define ull unsigned long long

// function
#define lb lower_bound
#define ub upper_bound

// const value
#define pi 3.14159265358979323846264338327950288419716939937510

using namespace std;

template <class T>
T min(T a, T b, T c) {
    return min(a, min(b, c));
}

template <class T>
T min(T a, T b, T c, T d) {
    return min(a, min(b, min(c, d)));
}

template <class T>
T max(T a, T b, T c) {
    return max(a, max(b, c));
}

template <class T>
T max(T a, T b, T c, T d) {
    return max(a, max(b, max(c, d)));
}

bool cmp(const ll& a, const ll& b) {return a > b;}

int cnt[maxN];
ll a[maxN];
map <ll, int> m, M;

string toStr(int n) {
    string s = "";
    while (n) {
        s += (char)(n%10+'0');
        n /= 10;
    }
    reverse(s.begin(), s.end());
    return s;
}

string add(string a, string b)
{
    string res="";
    while(a.length() < b.length()) a="0"+a;
    while(b.length() < a.length()) b="0"+b;
    int carry=0;
    for(int i=a.length()-1;i>=0;i--)
    {
        int tmp=a[i]-48 + b[i]-48 + carry;
        carry=tmp/10;
        tmp=tmp%10;
        res=(char)(tmp+48)+res;
    }
    if(carry>0) res="1"+res;
    return res;
}

string sub(string a, string b)
{
    string res="";
    while(a.length() < b.length()) a="0"+a;
    while(b.length() < a.length()) b="0"+b;
    bool neg=false;
    if(a<b)
    {
        swap(a,b);
        neg=true;
    }
    int borrow=0;
    for(int i=a.length()-1; i>=0;i--)
    {
        int tmp=a[i]-b[i]-borrow;
        if(tmp<0)
        {
            tmp+=10;
            borrow=1;
        }
        else borrow=0;
        res=(char)(tmp%10 + 48) + res;
    }
    while(res.length()>1 && res[0]=='0') res.erase(0,1);
    if(neg) res="-"+res;
    return res;
}

string mul(string a, string b)
{
    string res="";
    int n=a.length();
    int m=b.length();
    int len=n+m-1;
    int carry=0;
    for(int i=len;i>=0;i--)
    {
        int tmp=0;
        for(int j=n-1;j>=0;j--)
            if(i-j<=m && i-j>=1)
            {
                int a1=a[j]-48;
                int b1=b[i-j-1]-48;
                tmp+=a1*b1;
            }
            tmp+=carry;
            carry=tmp/10;
            res=(char)(tmp%10 + 48)+res;
    }
    while(res.length()>1 && res[0]=='0') res.erase(0,1);
    return res;
}

string c(int k, int n) {
    fto (i, 1, 100) cnt[i] = 0;
    fto (i, 1, n) {
        int t = i;
        fto (j, 2, t) {
            while (t%j == 0) {
                ++cnt[j];
                t /= j;
            }
        }
    }
    fto (i, 1, k) {
        int t = i;
        fto (j, 2, t) {
            while (t%j == 0) {
                --cnt[j];
                t /= j;
            }
        }
    }
    fto (i, 1, n-k) {
        int t = i;
        fto (j, 2, t) {
            while (t%j == 0) {
                --cnt[j];
                t /= j;
            }
        }
    }
    string ans = "1";
    fto (i, 1, 100) {
        fto (j, 1, cnt[i]) ans = mul(ans, toStr(i));
    }
    return ans;
}

int main() {

    int n, u, v;
    scanf("%d%d%d", &n, &u, &v);

    fto (i, 1, n) scanf("%lld", &a[i]);
    sort(a+1, a+n+1, cmp);

    double tmp = 0.0;
    fto (i, 1, u) tmp += (double)a[i];

    int U = u;
    while (a[u+1] == a[1] && u < v) ++u;

    fto (i, 1, u) ++m[a[i]];
    fto (i, 1, n) ++M[a[i]];

    if (u == U) {
        string ans = "1";
        fto (i, 1, n) {
            ans = mul(ans, c(m[a[i]], M[a[i]]));
            m[a[i]] = 0;
            M[a[i]] = 0;
        }

        printf("%.20f\n", tmp/U);
        cout << ans;
    }
    else {
        string ans = "0";
        fto (i, U, u) ans = add(ans, c(i, M[a[1]]));

        printf("%.20f\n", tmp/U);
        cout << ans;
    }
    return 0;
}


Measured memory_bytes: 2304