Language: C++

include <stdio>
using ll=long long;
using R=double;
using namespace std;
 
 // Combination Table
 ll C[51][51]; // C[n][k] -> nCk
 
 void comb_table(int N){
 for(int i=0;i<=N;++i){
 for(int j=0;j<=i;++j){
 if(j==0 or j==i){
 C[i][j]=1LL;
 }else{
 C[i][j]=(C[i-1][j-1]+C[i-1][j]);
 }
 }
 }
 }
 
int main(void){
 int N,A,B;
 cin >> N >> A >> B;
 
 const int NMAX=50;
 ll v[NMAX];
 
 for(int i=0;i<N;++i){
 cin >> v[i];
 }
 
 comb_table(N);
 sort(v,v+N);
 reverse(v,v+N);
 
 R max_average=0.0;
 for(int i=0;i<A;++i){
 max_average+=v[i];
 }
 max_average/=A;
 
 int a_th_val_num=0,a_th_val_pos=0;
 for(int i=0;i<N;++i){
 if(v[i]==v[A-1]){
 a_th_val_num++;
 if(i<A){
 a_th_val_pos++;
 }
 }
 }
 
 ll cnt=0LL;
 if(a_th_val_pos==A){
 for(a_th_val_pos=A;a_th_val_pos<=B;++a_th_val_pos){
 cnt+=C[a_th_val_num][a_th_val_pos];
 }
 }else{
 cnt+=C[a_th_val_num][a_th_val_pos];
 }
 
 cout.precision(20);
 cout << fixed << max_average << endl;
 cout << cnt << endl;
 
 return 0;
 }

Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include <stdio>
      | ^~~~~~~
a.cc:7:2: error: 'll' does not name a type
    7 |  ll C[51][51]; // C[n][k] -> nCk
      |  ^~
a.cc: In function 'void comb_table(int)':
a.cc:13:2: error: 'C' was not declared in this scope
   13 |  C[i][j]=1LL;
      |  ^
a.cc:15:2: error: 'C' was not declared in this scope
   15 |  C[i][j]=(C[i-1][j-1]+C[i-1][j]);
      |  ^
a.cc: In function 'int main()':
a.cc:23:2: error: 'cin' was not declared in this scope
   23 |  cin >> N >> A >> B;
      |  ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | include <stdio>
a.cc:26:2: error: 'll' was not declared in this scope
   26 |  ll v[NMAX];
      |  ^~
a.cc:29:9: error: 'v' was not declared in this scope
   29 |  cin >> v[i];
      |         ^
a.cc:33:7: error: 'v' was not declared in this scope
   33 |  sort(v,v+N);
      |       ^
a.cc:33:2: error: 'sort' was not declared in this scope; did you mean 'short'?
   33 |  sort(v,v+N);
      |  ^~~~
      |  short
a.cc:34:2: error: 'reverse' was not declared in this scope
   34 |  reverse(v,v+N);
      |  ^~~~~~~
a.cc:52:4: error: expected ';' before 'cnt'
   52 |  ll cnt=0LL;
      |    ^~~~
      |    ;
a.cc:55:2: error: 'cnt' was not declared in this scope; did you mean 'int'?
   55 |  cnt+=C[a_th_val_num][a_th_val_pos];
      |  ^~~
      |  int
a.cc:55:7: error: 'C' was not declared in this scope
   55 |  cnt+=C[a_th_val_num][a_th_val_pos];
      |       ^
a.cc:58:2: error: 'cnt' was not declared in this scope; did you mean 'int'?
   58 |  cnt+=C[a_th_val_num][a_th_val_pos];
      |  ^~~
      |  int
a.cc:58:7: error: 'C' was not declared in this scope
   58 |  cnt+=C[a_th_val_num][a_th_val_pos];
      |       ^
a.cc:61:2: error: 'cout' was not declared in this scope
   61 |  cout.precision(20);
      |  ^~~~
a.cc:61:2: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:62:10: error: 'fixed' was not declared in this scope
   62 |  cout << fixed << max_average << endl;
      |          ^~~~~
a.cc:1:1: note: 'std::fixed' is defined in header '<ios>'; this is probably fixable by adding '#include <ios>'
  +++ |+#include <ios>
    1 | include <stdio>
a.cc:62:34: error: 'endl' was not declared in this scope
   62 |  cout << fixed << max_average << endl;
      |                                  ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | include <stdio>
a.cc:63:10: error: 'cnt' was not declared in this scope; did you mean 'int'?
   63 |  cout << cnt << endl;
      |          ^~~
      |          int