#include<bits/stdc++.h> //Ithea Myse Valgulious
namespace chtholly{
typedef long long ll;
#define re0 register int
#define rec register char
#define rel register ll
#define gc getchar
#define pc putchar
#define p32 pc(' ')
#define pl puts("")
/*By Citrus*/
inline int read(){
  int x=0,f=1;char c=gc();
  for (;!isdigit(c);c=gc()) f^=c=='-';
  for (;isdigit(c);c=gc()) x=(x<<3)+(x<<1)+(c^'0');
  return f?x:-x;
  }
inline bool read(ll &x){
  x=0;int f=1;char c=gc();
  for (;!isdigit(c)&&~c;c=gc()) f^=c=='-';
  if (!~c) return 0;
  for (;isdigit(c);c=gc()) x=(x<<3)+(x<<1)+(c^'0');
  return x=f?x:-x,1;
  }
template <typename mitsuha>
inline int write(mitsuha x){
  if (!x) return pc(48);
  if (x<0) x=-x,pc('-');
  int bit[20],i,p=0;
  for (;x;x/=10) bit[++p]=x%10;
  for (i=p;i;--i) pc(bit[i]+48);
  }
inline char fuhao(){
  char c=gc();
  for (;isspace(c);c=gc());
  return c;
  }
}using namespace chtholly;
using namespace std;
int n,l,r;
ll last,a[55],jic[99]={1},res;
double ans;
map<ll,int> mp,cnt,vis;
bool bo;
double maxit(){
ll sum=0;
for (int i=1;i<=l;++i)
  sum+=a[i],cnt[a[i]]++;
last=a[l];
if (a[1]==a[l]) bo=1;
return 1.0*sum/l;
}

ll zuhe(int a,int b){
int i;
ll ans=1;
for (i=a-b+1;i<=a;++i){
  ans=ans*i/(i-a+b);
  } 
return ans;
}

int main(){
re0 i;n=read(),l=read(),r=read();
for (i=1;i<=n;++i) read(a[i]),mp[a[i]]++;
sort(a+1,a+n+1,greater<ll>());
printf("%.9lf\n",ans=maxit());
if (bo){
  for (i=l;i<=r;++i) res+=a[1]==a[i]?zuhe(mp[a[1]],i):0; 
  write(res);
  }
else write(zuhe(mp[last],cnt[last]));
}