Language: C++

#include <iostream>
#include<cstdlib>
#include<queue>
#include<set>
#include<vector>
#include<string>
#include<algorithm>
#include<stack>
#include<map>
#include<deque>
#include<cstdio>
using namespace std;
#define rep(i,a) for(int i=0;i<a;i++)
#define mp make_pair
#define pb push_back
//#define ll __int64
#define __int64 long long
#define P pair<ll,ll>
const ll mod=1000000007;
int n,a,b;
ll t[111111];

/*
ll C(ll y,ll z){
	ll a=1,b=1;
	for(ll i=0;i<z;i++)a*=y-i;
	for(ll i=1;i<=z;i++)b*=i;
	return a/b;
}*/
ll m[100][100];

ll C(ll n,ll r){
	if(m[n][r]!=0)return m[n][r];
	if(n==r)return m[n][r]=1;
	if(r==1)return m[n][r]=n;
	return m[n][r]=C(n-1,r)+C(n-1,r-1);
}
int main(){
	//cout<<C((ll)50,(ll)25)<<endl;
	cin>>n>>a>>b;
	rep(i,n)cin>>t[i];
	sort(t,t+n,greater<ll>());
	a--;
	b--;
	ll ma=t[0];
	ll pt=0,cnt=0;
	rep(i,a+1)cnt+=t[i];

	if(t[a]!=ma){
		int i=a;
		ll tmp=t[a];
		while(tmp==t[i])i++,pt++;
		double s=(double)cnt/(double)(a+1);
		printf("%.10lf\n",s);
		cout<<pt<<endl;
	}
	else{
		double s=(double)cnt/(double)(a+1);
		printf("%.10lf\n",s);
		int pos=a;
		ll tmp=t[a];
		while(tmp==t[pos])pos++;
		for(int i=a+1;i<=b+1;i++)pt+=C(pos,i);
		cout<<pt<<endl;
	}

}	


Compiler output:
a.cc:19:7: error: 'll' does not name a type
   19 | const ll mod=1000000007;
      |       ^~
a.cc:21:1: error: 'll' does not name a type
   21 | ll t[111111];
      | ^~
a.cc:30:1: error: 'll' does not name a type
   30 | ll m[100][100];
      | ^~
a.cc:32:1: error: 'll' does not name a type
   32 | ll C(ll n,ll r){
      | ^~
a.cc: In function 'int main()':
a.cc:41:22: error: 't' was not declared in this scope
   41 |         rep(i,n)cin>>t[i];
      |                      ^
a.cc:42:14: error: 't' was not declared in this scope; did you mean 'tm'?
   42 |         sort(t,t+n,greater<ll>());
      |              ^
      |              tm
a.cc:42:28: error: 'll' was not declared in this scope
   42 |         sort(t,t+n,greater<ll>());
      |                            ^~
a.cc:42:30: error: template argument 1 is invalid
   42 |         sort(t,t+n,greater<ll>());
      |                              ^
a.cc:45:11: error: expected ';' before 'ma'
   45 |         ll ma=t[0];
      |           ^~~
      |           ;
a.cc:46:11: error: expected ';' before 'pt'
   46 |         ll pt=0,cnt=0;
      |           ^~~
      |           ;
a.cc:47:19: error: 'cnt' was not declared in this scope; did you mean 'int'?
   47 |         rep(i,a+1)cnt+=t[i];
      |                   ^~~
      |                   int
a.cc:49:18: error: 'ma' was not declared in this scope; did you mean 'a'?
   49 |         if(t[a]!=ma){
      |                  ^~
      |                  a
a.cc:51:19: error: expected ';' before 'tmp'
   51 |                 ll tmp=t[a];
      |                   ^~~~
      |                   ;
a.cc:52:23: error: 'tmp' was not declared in this scope; did you mean 'tm'?
   52 |                 while(tmp==t[i])i++,pt++;
      |                       ^~~
      |                       tm
a.cc:52:37: error: 'pt' was not declared in this scope; did you mean 'pb'?
   52 |                 while(tmp==t[i])i++,pt++;
      |                                     ^~
      |                                     pb
a.cc:53:34: error: 'cnt' was not declared in this scope; did you mean 'int'?
   53 |                 double s=(double)cnt/(double)(a+1);
      |                                  ^~~
      |                                  int
a.cc:55:23: error: 'pt' was not declared in this scope; did you mean 'pb'?
   55 |                 cout<<pt<<endl;
      |                       ^~
      |                       pb
a.cc:58:34: error: 'cnt' was not declared in this scope; did you mean 'int'?
   58 |                 double s=(double)cnt/(double)(a+1);
      |                                  ^~~
      |                                  int
a.cc:61:19: error: expected ';' before 'tmp'
   61 |                 ll tmp=t[a];
      |                   ^~~~
      |                   ;
a.cc:62:23: error: 'tmp' was not declared in this scope; did you mean 'tm'?
   62 |                 while(tmp==t[pos])pos++;
      |                       ^~~
      |                       tm
a.cc:63:42: error: 'pt' was not declared in this scope; did you mean 'pb'?
   63 |                 for(int i=a+1;i<=b+1;i++)pt+=C(pos,i);
      |                                          ^~
      |                                          pb
a.cc:63:46: error: 'C' was not declared in this scope
   63 |                 for(int i=a+1;i<=b+1;i++)pt+=C(pos,i);
      |                                              ^
a.cc:64:23: error: 'pt' was not declared in this scope; did you mean 'pb'?
   64 |                 cout<<pt<<endl;
      |                       ^~
      |                       pb