criyle/codenet-compile-errors huggingface dataset:
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main() {
  int N;
  cin>>N;
  
  int m=0,a=0,r=0,c=0,h=0;
  
  for(int i=0;i<N;i++){
    string p;
    cin>>p;
    string name=p;
    char cap=name.at(0);
      
    if(cap=="M"){m++;}
    else if(cap=="A"){a++;}
    else if(cap=="R"){r++;}
    else if(cap=="C"){c++;}
    else if(cap=="H"){h++;}
    else{continue;}
  }
  
  int sum=m*a*r+m*a*c+m*a*h+m*r*c+m*r*h+m*c*h+a*r*c+a*r*h+a*c*h+r*c*h;
  
  cout<<sum<<endl;
  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:16:11: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   16 |     if(cap=="M"){m++;}
      |        ~~~^~~~~
a.cc:17:16: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   17 |     else if(cap=="A"){a++;}
      |             ~~~^~~~~
a.cc:18:16: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   18 |     else if(cap=="R"){r++;}
      |             ~~~^~~~~
a.cc:19:16: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   19 |     else if(cap=="C"){c++;}
      |             ~~~^~~~~
a.cc:20:16: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   20 |     else if(cap=="H"){h++;}
      |             ~~~^~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main() {
  int N;
  cin>>N;
  
  int m=0,a=0,r=0,c=0,h=0;
  
  for(int i=0;i<N;i++){
    string p;
    cin>>p;
    string name=p,cap=name.at(0);
      
    if(cap=="M"){m++;}
    else if(cap=="A"){a++;}
    else if(cap=="R"){r++;}
    else if(cap=="C"){c++;}
    else if(cap=="H"){h++;}
    else{continue;}
  }
  
  int sum=m*a*r+m*a*c+m*a*h+m*r*c+m*r*h+m*c*h+a*r*c+a*r*h+a*c*h+r*c*h;
  
  cout<<sum<<endl;
  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:30: error: conversion from '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} to non-scalar type 'std::string' {aka 'std::__cxx11::basic_string<char>'} requested
   13 |     string name=p,cap=name.at(0);
      |                       ~~~~~~~^~~
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main() {
  int N;
  cin>>N;
  
  int m=0,a=0,r=0,c=0,h=0;
  
  for(int i=0;i<N;i++){
    string name;
    cin>>name;
    
    std::string cap=name.at(0);
      
    if(cap=="M"){m++;}
    else if(cap=="A"){a++;}
    else if(cap=="R"){r++;}
    else if(cap=="C"){c++;}
    else if(cap=="H"){h++;}
    else{continue;}
  }
  
  int sum=m*a*r+m*a*c+m*a*h+m*r*c+m*r*h+m*c*h+a*r*c+a*r*h+a*c*h+r*c*h;
  
  cout<<sum<<endl;
  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:28: error: conversion from '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} to non-scalar type 'std::string' {aka 'std::__cxx11::basic_string<char>'} requested
   14 |     std::string cap=name.at(0);
      |                     ~~~~~~~^~~
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main() {
  int N;
  cin>>N;
  
  int m=0,a=0,r=0,c=0,h=0;
  
  for(int i=0;i<N;i++){
    string name;
    cin>>name;
    
    string cap=name.at(0);
      
    if(cap=="M"){m++;}
    else if(cap=="A"){a++;}
    else if(cap=="R"){r++;}
    else if(cap=="C"){c++;}
    else if(cap=="H"){h++;}
    else{continue;}
  }
  
  int sum=m*a*r+m*a*c+m*a*h+m*r*c+m*r*h+m*c*h+a*r*c+a*r*h+a*c*h+r*c*h;
  
  cout<<sum<<endl;
  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:23: error: conversion from '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} to non-scalar type 'std::string' {aka 'std::__cxx11::basic_string<char>'} requested
   14 |     string cap=name.at(0);
      |                ~~~~~~~^~~
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main() {
  int N;
  cin>>N;
  
  int m=0,a=0,r=0,c=0,h=0;
  
  for(int i=0;i<N;i++){
    string name;
    cin>>name;
    
    char cap=name.at(0);
      
    if(cap=="M"){m++;}
    else if(cap=="A"){a++;}
    else if(cap=="R"){r++;}
    else if(cap=="C"){c++;}
    else if(cap=="H"){h++;}
    else{continue;}
  }
  
  int sum=m*a*r+m*a*c+m*a*h+m*r*c+m*r*h+m*c*h+a*r*c+a*r*h+a*c*h+r*c*h;
  
  cout<<sum<<endl;
  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:16:11: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   16 |     if(cap=="M"){m++;}
      |        ~~~^~~~~
a.cc:17:16: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   17 |     else if(cap=="A"){a++;}
      |             ~~~^~~~~
a.cc:18:16: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   18 |     else if(cap=="R"){r++;}
      |             ~~~^~~~~
a.cc:19:16: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   19 |     else if(cap=="C"){c++;}
      |             ~~~^~~~~
a.cc:20:16: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   20 |     else if(cap=="H"){h++;}
      |             ~~~^~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main() {
  int N;
  cin>>N;
  
  int m=0,a=0,r=0,c=0,h=0;
  
  for(int i=0;i<N;i++){
    string name;
    cin>>name;
      
    if(name.at(0)==M){m++;}
    else if(name.at(0)==A){a++;}
    else if(name.at(0)==R){r++;}
    else if(name.at(0)==C){c++;}
    else if(name.at(0)==H){h++;}
    else{continue;}
  }
  
  int sum=m*a*r+m*a*c+m*a*h+m*r*c+m*r*h+m*c*h+a*r*c+a*r*h+a*c*h+r*c*h;
  
  cout<<sum<<endl;
  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:20: error: 'M' was not declared in this scope
   14 |     if(name.at(0)==M){m++;}
      |                    ^
a.cc:15:25: error: 'A' was not declared in this scope
   15 |     else if(name.at(0)==A){a++;}
      |                         ^
a.cc:16:25: error: 'R' was not declared in this scope
   16 |     else if(name.at(0)==R){r++;}
      |                         ^
a.cc:17:25: error: 'C' was not declared in this scope
   17 |     else if(name.at(0)==C){c++;}
      |                         ^
a.cc:18:25: error: 'H' was not declared in this scope
   18 |     else if(name.at(0)==H){h++;}
      |                         ^
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main() {
  int N;
  cin>>N;
  
  int m=0,a=0,r=0,c=0,h=0;
  
  for(int i=0;i<N;i++){
    string name;
    cin>>name;
      
    if(name.at(0)=="M"){m++;}
    else if(name.at(0)=="A"){a++;}
    else if(name.at(0)=="R"){r++;}
    else if(name.at(0)=="C"){c++;}
    else if(name.at(0)=="H"){h++;}
    else{continue;}
  }
  
  int sum=m*a*r+m*a*c+m*a*h+m*r*c+m*r*h+m*c*h+a*r*c+a*r*h+a*c*h+r*c*h;
  
  cout<<sum<<endl;
  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:18: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   14 |     if(name.at(0)=="M"){m++;}
      |        ~~~~~~~~~~^~~~~
a.cc:15:23: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   15 |     else if(name.at(0)=="A"){a++;}
      |             ~~~~~~~~~~^~~~~
a.cc:16:23: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   16 |     else if(name.at(0)=="R"){r++;}
      |             ~~~~~~~~~~^~~~~
a.cc:17:23: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   17 |     else if(name.at(0)=="C"){c++;}
      |             ~~~~~~~~~~^~~~~
a.cc:18:23: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   18 |     else if(name.at(0)=="H"){h++;}
      |             ~~~~~~~~~~^~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main() {
  int N;
  cin>>N;
  
  int m=0,a=0,r=0,c=0,h=0;
  
  for(int i=0;i<N;i++){
    string name;
    cin>>name;
      
    if(name.at(0)=="M"){m++;}
    else if(name.at(0)=="A"){a++;}
    else if(name.at(0)=="R"){r++;}
    else if(name.at(0)=="C"){c++;}
    else if(name.at(0)=="H"){h++;}
    else{continue;}
  }
  
  int sum={(m*a*r+m*a*c+m*a*h)+(m*r*c+m*r*h)+(m*c*h)}
        +{(a*r*c+a*r*h)+(a*c*h)}
        +{(r*c*h)};
  
  cout<<sum<<endl;
  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:18: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   14 |     if(name.at(0)=="M"){m++;}
      |        ~~~~~~~~~~^~~~~
a.cc:15:23: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   15 |     else if(name.at(0)=="A"){a++;}
      |             ~~~~~~~~~~^~~~~
a.cc:16:23: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   16 |     else if(name.at(0)=="R"){r++;}
      |             ~~~~~~~~~~^~~~~
a.cc:17:23: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   17 |     else if(name.at(0)=="C"){c++;}
      |             ~~~~~~~~~~^~~~~
a.cc:18:23: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   18 |     else if(name.at(0)=="H"){h++;}
      |             ~~~~~~~~~~^~~~~
a.cc:23:9: error: expected ',' or ';' before '+' token
   23 |         +{(a*r*c+a*r*h)+(a*c*h)}
      |         ^
a.cc:24:10: error: expected primary-expression before '{' token
   24 |         +{(r*c*h)};
      |          ^
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main() {
  int N;
  cin>>N;
  
  int m=0,a=0,r=0,c=0,h=0;
  
  for(int i=0;i<N;i++){
    string name;
    cin>>name;
      
    if(name.at(0)=="M"){m++;}
    else if(name.at(0)=="A"){a++;}
    else if(name.at(0)=="R"){r++;}
    else if(name.at(0)=="C"){c++;}
    else if(name.at(0)=="H"){h++;}
    else{continue}
  }
  
  cout<<{(m*a*r+m*a*c+m*a*h)+(m*r*c+m*r*h)+(m*c*h)}
        +{(a*r*c+a*r*h)+(a*c*h)}
        +{(r*c*h)}<<endl;
  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:18: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   14 |     if(name.at(0)=="M"){m++;}
      |        ~~~~~~~~~~^~~~~
a.cc:15:23: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   15 |     else if(name.at(0)=="A"){a++;}
      |             ~~~~~~~~~~^~~~~
a.cc:16:23: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   16 |     else if(name.at(0)=="R"){r++;}
      |             ~~~~~~~~~~^~~~~
a.cc:17:23: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   17 |     else if(name.at(0)=="C"){c++;}
      |             ~~~~~~~~~~^~~~~
a.cc:18:23: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   18 |     else if(name.at(0)=="H"){h++;}
      |             ~~~~~~~~~~^~~~~
a.cc:19:18: error: expected ';' before '}' token
   19 |     else{continue}
      |                  ^
      |                  ;
a.cc:22:9: error: expected primary-expression before '{' token
   22 |   cout<<{(m*a*r+m*a*c+m*a*h)+(m*r*c+m*r*h)+(m*c*h)}
      |         ^
a.cc:23:10: error: expected primary-expression before '{' token
   23 |         +{(a*r*c+a*r*h)+(a*c*h)}
      |          ^
a.cc:24:10: error: expected primary-expression before '{' token
   24 |         +{(r*c*h)}<<endl;
      |          ^
a.cc:24:19: error: expected primary-expression before '<<' token
   24 |         +{(r*c*h)}<<endl;
      |                   ^~
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main() {
  int N;
  cin>>N;
  
  int m=0,a=0,r=0,c=0,h=0;
  
  for(int i=0;i<N;i++){
    string name;
    cin>>name;
      
    if(name.at(0)=="M"){m++}
    else if(name.at(0)=="A"){a++}
    else if(name.at(0)=="R"){r++}
    else if(name.at(0)=="C"){c++}
    else if(name.at(0)=="H"){h++}
    else{continue}
  }
  
  cout<<{(m*a*r+m*a*c+m*a*h)+(m*r*c+m*r*h)+(m*c*h)}
        +{(a*r*c+a*r*h)+(a*c*h)}
        +{(r*c*h)}<<endl;
  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:18: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   14 |     if(name.at(0)=="M"){m++}
      |        ~~~~~~~~~~^~~~~
a.cc:14:28: error: expected ';' before '}' token
   14 |     if(name.at(0)=="M"){m++}
      |                            ^
      |                            ;
a.cc:15:23: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   15 |     else if(name.at(0)=="A"){a++}
      |             ~~~~~~~~~~^~~~~
a.cc:15:33: error: expected ';' before '}' token
   15 |     else if(name.at(0)=="A"){a++}
      |                                 ^
      |                                 ;
a.cc:16:23: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   16 |     else if(name.at(0)=="R"){r++}
      |             ~~~~~~~~~~^~~~~
a.cc:16:33: error: expected ';' before '}' token
   16 |     else if(name.at(0)=="R"){r++}
      |                                 ^
      |                                 ;
a.cc:17:23: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   17 |     else if(name.at(0)=="C"){c++}
      |             ~~~~~~~~~~^~~~~
a.cc:17:33: error: expected ';' before '}' token
   17 |     else if(name.at(0)=="C"){c++}
      |                                 ^
      |                                 ;
a.cc:18:23: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   18 |     else if(name.at(0)=="H"){h++}
      |             ~~~~~~~~~~^~~~~
a.cc:18:33: error: expected ';' before '}' token
   18 |     else if(name.at(0)=="H"){h++}
      |                                 ^
      |                                 ;
a.cc:19:18: error: expected ';' before '}' token
   19 |     else{continue}
      |                  ^
      |                  ;
a.cc:22:9: error: expected primary-expression before '{' token
   22 |   cout<<{(m*a*r+m*a*c+m*a*h)+(m*r*c+m*r*h)+(m*c*h)}
      |         ^
a.cc:23:10: error: expected primary-expression before '{' token
   23 |         +{(a*r*c+a*r*h)+(a*c*h)}
      |          ^
a.cc:24:10: error: expected primary-expression before '{' token
   24 |         +{(r*c*h)}<<endl;
      |          ^
a.cc:24:19: error: expected primary-expression before '<<' token
   24 |         +{(r*c*h)}<<endl;
      |                   ^~
Language: C++

#include <iostream>
#include <algorithm>
#include <bits/stdc++.h>
 
using namespace std;
 
int main (){
  
  int d,m,a,r,c,h,b[10],e;
  string s[100010],c[100010];
  
  cin >>d;
  
  for(int i=0;i<a;i++){
    cin >> s[i];
  }
  
  for(int i=0;i<11;i++){
    b[i] = 0;
  }
  m=1,a=2,r=3,c=4,h=5;
  for(int i=0;i<a;i++){
    if(s[i][0] == 'M') b[m]++;
    if(s[i][0] == 'A') b[a]++;
    if(s[i][0] == 'R') b[r]++;
    if(s[i][0] == 'C') b[c]++;
    if(s[i][0] == 'H') b[h]++;
  }
  e =0;
  for(int i=0;i<11;i++){
    for(int j =i+1;j<11;j++){
      for(int k=j+1;k<11;k++){
        e +=b[i]*b[j]*b[k];
      }
    }
  }
  cout << e << endl;
  
  return 0;
}
    
    
    


Compiler output:
a.cc: In function 'int main()':
a.cc:10:20: error: conflicting declaration 'std::string c [100010]'
   10 |   string s[100010],c[100010];
      |                    ^
a.cc:9:15: note: previous declaration as 'int c'
    9 |   int d,m,a,r,c,h,b[10],e;
      |               ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
const int mod = 1000000007;
#define rep(i, n) for(int i = 0; i < (n); i++)

int int_len(int n) {
  int s=0;
  while(n!=0) s++, n/=10;
  return s;
}

int int_sum(int n) {
  int m=0,s=0,a=n;
  while(a!=0) s++, a/=10;
  for(int i=s-1;i>=0;i--) m+=n/((int)pow(10,i))-(n/((int)pow(10,i+1)))*10;
  return m;
}






long long int gcd(long long int a,long long int b)
{
 
  long long int r, tmp;
 
  
 
  /* 自然数 a > b を確認・入替 */
  if(a<b){
    tmp = a;
    a = b;
    b = tmp;
  }
 
  /* ユークリッドの互除法 */
  r = a % b;
  while(r!=0){
    a = b;
    b = r;
    r = a % b;
  }
 
 
 
  return b;
}







int fac(int n){
  int m=1;
  while(n>=1) m*=n,n--;
  return m;
}

int vec_sum(vector<int> v){
  int n=0;
  for(int i=0;i<v.size();i++) n+=v[i];
  return n;
}
///////////////////////////
int main() {
  int n,ans=0,c[5];
  cin>>n;
  rep(i,n){
    string s;
    cin>>s;
    if(s[0]=='M'){
      c[0]++;
    }else if(s[0]=='A'){
      c[1]++;
    }else if(s[0]=='R'){
      c[2]++;
    }else if(s[0]=='C'){
      c[3]++;
    }else if(s[0]=='H'){
      c[4]++;
    }
  }
  rep(i,5) if(c[i]>0) count++;
  if(count<=2){
    cout<<0<<endl;
    return 0;
  }
  for(int p=0;p<3;p++){
    for(int q=p+1;q<4;q++){
      for(int r=q+1;r<5;r++){
        ans+=c[p]*c[q]*c[r];
      }
    }
  }
  cout<<ans<<endl;
}
///////////////////////////

Compiler output:
a.cc: In function 'int main()':
a.cc:87:28: error: no post-increment operator for type
   87 |   rep(i,5) if(c[i]>0) count++;
      |                            ^~
a.cc:88:11: error: invalid operands of types '<unresolved overloaded function type>' and 'int' to binary 'operator<='
   88 |   if(count<=2){
      |      ~~~~~^~~
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main() {
  int N;
  
  for ( i == 0 ; i < N ; i++){
   cin >> si;  
  }
    
}




Compiler output:
a.cc: In function 'int main()':
a.cc:7:9: error: 'i' was not declared in this scope
    7 |   for ( i == 0 ; i < N ; i++){
      |         ^
a.cc:8:11: error: 'si' was not declared in this scope; did you mean 'sin'?
    8 |    cin >> si;
      |           ^~
      |           sin
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int n,m=0,a=0,r=0,c=0,h=0;
  long long ans=;
  cin>>n;
  string s;
  for(int i=0;i<n;i++){
    cin>>s;
    if(s[0]=='M'){m++;}
    else if(s[0]=='A'){a++;}
    else if(s[0]=='R'){r++;}
    else if(s[0]=='C'){c++;}
    else if(s[0]=='H'){h++;}
  }
  ans=m*(a*r+a*c+a*h+r*c+r*h+c*h)+a*(r*c+r*h+c*h)+r*c*h;
  cout<<ans;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:17: error: expected primary-expression before ';' token
    5 |   long long ans=;
      |                 ^
Language: C++

int main(){

  int N;
  cin >> N;
  set<char> cset = {'M', 'A', 'R', 'C', 'H'};
  map<char, long int> m;
  for(int i=0; i<N; ++i){
    string s;
    cin >> s;
    if(cset.find(s[0]) != cset.end()){
      if(m.find(s[0]) == m.end()) m[s[0]] = 1;
      else m[s[0]]++;
    }
  }

  vector<long int> v;
  for(auto x: m){
    v.push_back(x.second);
    cout << x.first << " " << x.second << endl;
  }
  long int ans = 0;
  for(int i=0; i<v.size(); ++i){
    for(int j=i+1; j<v.size(); ++j){
      for(int k=j+1; k<v.size(); ++k){
        ans += v[i] * v[j] * v[k];
      }
    }
  }
  cout << ans << endl;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:3: error: 'cin' was not declared in this scope
    4 |   cin >> N;
      |   ^~~
a.cc:5:3: error: 'set' was not declared in this scope
    5 |   set<char> cset = {'M', 'A', 'R', 'C', 'H'};
      |   ^~~
a.cc:5:7: error: expected primary-expression before 'char'
    5 |   set<char> cset = {'M', 'A', 'R', 'C', 'H'};
      |       ^~~~
a.cc:6:3: error: 'map' was not declared in this scope
    6 |   map<char, long int> m;
      |   ^~~
a.cc:6:7: error: expected primary-expression before 'char'
    6 |   map<char, long int> m;
      |       ^~~~
a.cc:8:5: error: 'string' was not declared in this scope
    8 |     string s;
      |     ^~~~~~
a.cc:9:12: error: 's' was not declared in this scope
    9 |     cin >> s;
      |            ^
a.cc:10:8: error: 'cset' was not declared in this scope
   10 |     if(cset.find(s[0]) != cset.end()){
      |        ^~~~
a.cc:11:10: error: 'm' was not declared in this scope
   11 |       if(m.find(s[0]) == m.end()) m[s[0]] = 1;
      |          ^
a.cc:16:3: error: 'vector' was not declared in this scope
   16 |   vector<long int> v;
      |   ^~~~~~
a.cc:16:10: error: expected primary-expression before 'long'
   16 |   vector<long int> v;
      |          ^~~~
a.cc:17:15: error: 'm' was not declared in this scope
   17 |   for(auto x: m){
      |               ^
a.cc:18:5: error: 'v' was not declared in this scope
   18 |     v.push_back(x.second);
      |     ^
a.cc:19:5: error: 'cout' was not declared in this scope
   19 |     cout << x.first << " " << x.second << endl;
      |     ^~~~
a.cc:19:43: error: 'endl' was not declared in this scope
   19 |     cout << x.first << " " << x.second << endl;
      |                                           ^~~~
a.cc:22:18: error: 'v' was not declared in this scope
   22 |   for(int i=0; i<v.size(); ++i){
      |                  ^
a.cc:29:3: error: 'cout' was not declared in this scope
   29 |   cout << ans << endl;
      |   ^~~~
a.cc:29:18: error: 'endl' was not declared in this scope
   29 |   cout << ans << endl;
      |                  ^~~~
Language: C

#include <stdio.h>
int main(void) {
    int n;
    lochar s[100000][101];
    scanf("%d", &n);
    for (int i = 0; i < n; i++) {
        scanf("%s", s[i]);
    }

    int cm = 0, ca = 0, cr = 0, cc = 0, ch = 0;
    for (int i = 0; i < n; i++) {
        if (s[i][0] == 'M') {
            cm++;
        }
        if (s[i][0] == 'A') {
            ca++;
        }
        if (s[i][0] == 'R') {
            cr++;
        }
        if (s[i][0] == 'C') {
            cc++;
        }
        if (s[i][0] == 'H') {
            ch++;
        }
    }
    // printf("cnt=%d %d %d %d %d\n", cm, ca, cr, cc, ch);
    int ans = 0;
    ans = cm * ca * cr;
    ans += cm * ca * cc;
    ans += cm * ca * ch;
    ans += cm * cr * cc;
    ans += cm * cr * ch;
    ans += cm * cc * ch;
    ans += ca * cr * cc;
    ans += ca * cr * ch;
    ans += ca * cc * ch;
    ans += cr * cc * ch;
    printf("%d\n", ans);
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:4:5: error: unknown type name 'lochar'; did you mean 'char'?
    4 |     lochar s[100000][101];
      |     ^~~~~~
      |     char
Language: Java

import java.util.*;
 
public class Main{

    public static void main(String args[]){
        Scanner sc = new Scanner(System.in);
        
        int N = sc.nextInt();
        String[] S = new String[N];
        for(int i = 0; i < N; i++){
            S[i] = sc.next();
        }
        sc.close();
        long m = 0;
        long a = 0;
        long r = 0;
        long c = 0;
        long h = 0;
        LongSummaryStatistics= 0;
        for(int i = 0; i < N; i++){
            if(S[i].charAt(0) == 'M')
                m++;
            if(S[i].charAt(0) == 'A')
                a++;
            if(S[i].charAt(0) == 'R')
                r++;
            if(S[i].charAt(0) == 'C')
                c++;
            if(S[i].charAt(0) == 'H')
                h++;
        }
        long sum = 0;
        sum += m*a*r +
                m*a*c +
                m*a*h +
                m*r*c +
                m*r*h +
                m*c*h +
                a*r*c +
                a*r*h +
                a*c*h +
                r*c*h;

        System.out.println(sum);
    }
}

Compiler output:
Main.java:19: error: cannot find symbol
        LongSummaryStatistics= 0;
        ^
  symbol:   variable LongSummaryStatistics
  location: class Main
1 error
Language: Java

import java.util.*;
 
public class Main{

    public static void main(String args[]){
        Scanner sc = new Scanner(System.in);
        
        int N = sc.nextInt();
        String[] S = new String[N];
        for(int i = 0; i < N; i++){
            S[i] = sc.next();
        }
        sc.close();
        long m = 0;
        long a = 0;
        long r = 0;
        long c = 0;
        LongSummaryStatistics= 0;
        for(int i = 0; i < N; i++){
            if(S[i].charAt(0) == 'M')
                m++;
            if(S[i].charAt(0) == 'A')
                a++;
            if(S[i].charAt(0) == 'R')
                r++;
            if(S[i].charAt(0) == 'C')
                c++;
            if(S[i].charAt(0) == 'H')
                h++;
        }
        long sum = 0;
        sum += m*a*r +
                m*a*c +
                m*a*h +
                m*r*c +
                m*r*h +
                m*c*h +
                a*r*c +
                a*r*h +
                a*c*h +
                r*c*h;

        System.out.println(sum);
    }
}

Compiler output:
Main.java:18: error: cannot find symbol
        LongSummaryStatistics= 0;
        ^
  symbol:   variable LongSummaryStatistics
  location: class Main
Main.java:29: error: cannot find symbol
                h++;
                ^
  symbol:   variable h
  location: class Main
Main.java:34: error: cannot find symbol
                m*a*h +
                    ^
  symbol:   variable h
  location: class Main
Main.java:36: error: cannot find symbol
                m*r*h +
                    ^
  symbol:   variable h
  location: class Main
Main.java:37: error: cannot find symbol
                m*c*h +
                    ^
  symbol:   variable h
  location: class Main
Main.java:39: error: cannot find symbol
                a*r*h +
                    ^
  symbol:   variable h
  location: class Main
Main.java:40: error: cannot find symbol
                a*c*h +
                    ^
  symbol:   variable h
  location: class Main
Main.java:41: error: cannot find symbol
                r*c*h;
                    ^
  symbol:   variable h
  location: class Main
8 errors
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main() {
  int64_t n;
  cin>>n;
  vector<string> s(n);
  for(int i=0;i<n;i++){
    cin>>s.at(i);
  }
  int M=0;
  int A=0;
  int R=0;
  int C=0;
  int H=0;
  for(int i=0;i<n;i++){
    if(s,at(i)=='M'){
      M++;
      }
    if(s,at(i)=='A'){
      A++;
      }
    if(s,at(i)=='R'){
      R++;
      }
    if(s,at(i)=='C'){
      C++;
      }
    if(s,at(i)=='H'){
      H++;
      }
    }
  int64_t count=0;
  count+=M*A*R+M*A*C+M*A*H+M*R*C+M*R*H+M*C*H+A*R*C+A*R*H+A*C*H+R*C*H;
  cout<<count;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:10: error: 'at' was not declared in this scope
   17 |     if(s,at(i)=='M'){
      |          ^~
a.cc:20:10: error: 'at' was not declared in this scope
   20 |     if(s,at(i)=='A'){
      |          ^~
a.cc:23:10: error: 'at' was not declared in this scope
   23 |     if(s,at(i)=='R'){
      |          ^~
a.cc:26:10: error: 'at' was not declared in this scope
   26 |     if(s,at(i)=='C'){
      |          ^~
a.cc:29:10: error: 'at' was not declared in this scope
   29 |     if(s,at(i)=='H'){
      |          ^~
Language: C++

//  Created by liszt on 2019/07/27.
#include<bits/stdc++.h>
using namespace std;

int main(){
    int n,MARCH[5]={0}; cin>>n;
    vector<string> s(n);
    for(int i=0;i<n;i++){
        string S; cin>>S;
        s[i]=S;
        if(S[0]=='M')MARCH[0]++;
        else if(S[0]=='A')MARCH[1]++;
        else if(S[0]=='R')MARCH[2]++;
        else if(S[0]=='C')MARCH[3]++;
        else if(S[0]=='H')MARCH[4]++;
    }
    
    long long ans=0;
    //MAR
    ans+=MARCH[0]*MARCH[1]*MARCH[2];
    //MAC
    ans+=MARCH[0]*MARCH[1]*march[3];
    //MAH
    ans+=MARCH[0]*MARCH[1]*MARCH[4];
    //MRC
    ans+=MARCH[0]*MARCH[2]*MARCH[3];
    //MRH
    ans+=MARCH[0]*MARCH[2]*MARCH[4];
    //MCH
    ans+=MARCH[0]*MARCH[3]*MARCH[4];
    //ARC
    ans+=MARCH[1]*MARCH[2]*MARCH[3];
    //ARH
    ans+=MARCH[1]*MARCH[2]*MARCH[4];
    //ACH
    ans+=MARCH[1]*MARCH[3]*MARCH[4];
    //RCH
    ans+=MARCH[2]*MARCH[3]*MARCH[4];
    
    cout<<ans<<endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:28: error: 'march' was not declared in this scope
   22 |     ans+=MARCH[0]*MARCH[1]*march[3];
      |                            ^~~~~
Language: C++

import itertools
N = int(input())
nm = []
for i in range(N):
    S = input()
    nm.append(S[0])
tm = [nm.count(i) for i in str('MARCH')]
f = [(n == 0) for n in tm]
ans = 0
for i,j,k in itertools.combinations(range(5), 3):
    ans += tm[i]*tm[j]*tm[k] 
print(ans)


Compiler output:
a.cc:7:32: warning: multi-character literal with 5 characters exceeds 'int' size of 4 bytes
    7 | tm = [nm.count(i) for i in str('MARCH')]
      |                                ^~~~~~~
a.cc:1:1: error: 'import' does not name a type
    1 | import itertools
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
Language: C++

# include <cstdio>
# include <iostream>
using namespace std ;
typedef long long ll ;
string s ;
int N ;
ll m ,a ,r ,c , h ;
ll D [5];
int P [10]={0 ,0 ,0 ,0 ,0 ,0 ,1 ,1 ,1 ,2};
int Q [10]={1 ,1 ,1 ,2 ,2 ,3 ,2 ,2 ,3 ,3};
int R [10]={2 ,3 ,4 ,3 ,4 ,4 ,3 ,4 ,4 ,4};
int main ()
{
	scanf ("% d " ,& N );
	for ( int i =0; i < N ; i ++)
	{
		cin > > s ;
		if ( s [0]== 'M') m ++;
		if ( s [0]== 'A') a ++;
		if ( s [0]== 'R') r ++;
		if ( s [0]== 'C') c ++;
		if ( s [0]== 'H') h ++;
	}
	D[0]= m , D[1]= a , D[2]= r , D[3]= c , D[4]= h ;
	ll res =0;
	for ( int d =0; d <10; d ++) {
		res += D [ P [ d ]]* D [ Q [ d ]]* D [ R [ d ]];
		printf ("% lld \ n " , res )
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:23: error: expected primary-expression before '>' token
   17 |                 cin > > s ;
      |                       ^
a.cc:28:25: warning: unknown escape sequence: '\040'
   28 |                 printf ("% lld \ n " , res )
      |                         ^~~~~~~~~~~~
a.cc:28:45: error: expected ';' before '}' token
   28 |                 printf ("% lld \ n " , res )
      |                                             ^
      |                                             ;
   29 |         }
      |         ~
Language: C++

# include < cstdio >
# include < iostream >
using namespace std ;
typedef long long ll ;
string s ;
int N ;
ll m ,a ,r ,c , h ;
ll D [5];
int P [10]={0 ,0 ,0 ,0 ,0 ,0 ,1 ,1 ,1 ,2};
int Q [10]={1 ,1 ,1 ,2 ,2 ,3 ,2 ,2 ,3 ,3};
int R [10]={2 ,3 ,4 ,3 ,4 ,4 ,3 ,4 ,4 ,4};
int main ()
{
	scanf ("% d " ,& N );
	for ( int i =0; i < N ; i ++)
	{
		cin > > s ;
		if ( s [0]== ’ M ’) m ++;
		if ( s [0]== ’ A ’) a ++;
		if ( s [0]== ’ R ’) r ++;
		if ( s [0]== ’ C ’) c ++;
		if ( s [0]== ’ H ’) h ++;
	}
	D[0]= m , D[1]= a , D[2]= r , D[3]= c , D[4]= h ;
	ll res =0;
	for ( int d =0; d <10; d ++) {
		res += D [ P [ d ]]* D [ Q [ d ]]* D [ R [ d ]];
		printf ("% lld \ n " , res )
	}
}

Compiler output:
a.cc:1:11: fatal error:  cstdio : No such file or directory
    1 | # include < cstdio >
      |           ^~~~~~~~~~
compilation terminated.
Language: C++

# include < cstdio >
# include < iostream >
using namespace std ;
typedef long long ll ;
string s ;
int N ;
ll m ,a ,r ,c , h ;
ll D [5];
int P [10]={0 ,0 ,0 ,0 ,0 ,0 ,1 ,1 ,1 ,2};
int Q [10]={1 ,1 ,1 ,2 ,2 ,3 ,2 ,2 ,3 ,3};
int R [10]={2 ,3 ,4 ,3 ,4 ,4 ,3 ,4 ,4 ,4};
int main ()
{
scanf ("% d " ,& N );
for ( int i =0; i < N ; i ++)
{
cin > > s ;
if ( s [0]== ’ M ’) m ++;
if ( s [0]== ’ A ’) a ++;
if ( s [0]== ’ R ’) r ++;
if ( s [0]== ’ C ’) c ++;
if ( s [0]== ’ H ’) h ++;
}
D [0]= m , D [1]= a , D [2]= r , D [3]= c , D [4]= h ;
ll res =0;
for ( int d =0; d <10; d ++)
res += D [ P [ d ]]* D [ Q [ d ]]* D [ R [ d ]];
printf ("% lld \ n " , res )
}

Compiler output:
a.cc:1:11: fatal error:  cstdio : No such file or directory
    1 | # include < cstdio >
      |           ^~~~~~~~~~
compilation terminated.
Language: C

#define _CRT_SECURE_NO_WARNINGS

#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <math.h>

/* define */
#define Yes(X) puts ( (X) ? "Yes" : "No")
#define YES(X) puts ( (X) ? "YES" : "NO")
#define FOR(i, a, b) for ( int i = (a); i < (b) ; i++)
#define REP(i, n) for ( int i = 0; i < (n) ; i++)
#define max(a, b) (((a) > (b)) ? (a) : (b))
#define min(a, b) (((a) < (b)) ? (a) : (b))
#define max3(a, b, c) ((max((a), (b)) > (c)) ? max((a), (b)) : (c))
#define min3(a, b, c) ((min((a), (b)) < (c)) ? min((a), (b)) : (c))

/* const */
const int MOD = 1000000007;

/* alias */
typedef long long ll;
typedef unsigned  u;

/* function */
int cmp(const void *a, const void *b) {
	return *(int*)a - *(int*)b;
}
int cmp2(const void *a, const void *b) {
	return *(int*)b - *(int*)a;
}
int gcd(int a, int b) {
	if (b != 0)return gcd(b, a % b);
	return a;
}
ll Lgcd(ll a, ll b) {
	if (b != 0) return Lgcd(b, a % b);
	return a;
}
int lcm(int a, int b) {
	return a / gcd(a, b) * b;
}
ll Llcm(ll a, ll b) {
	return a / Lgcd(a, b) * b;
}

/* main */
int n, s = 0, c[5] = {0}, select[5] = {0};
ll ans = 0;
ll com(int x) {
	if (s == 3) {
		int m = 1;
		REP(i, 5) if (select[i] == 1)m *= c[i];
		ans += m;
		return 0;
	}
	for(int i = x; i < n; i++) {
		if (select[i] == 0) {
			select[i]++;
			s++;
			com(i);
			select[i]--;
			s--;
		}
	}
	return ans;
}

int main() {
	char s[100000];
	scanf("%d%*c", &n);
	REP(i, n) {
		scanf("%s", &s[i]);
		if (s[i] == 'M')c[0]++;
		if (s[i] == 'A')c[1]++;
		if (s[i] == 'R')c[2]++;
		if (s[i] == 'C')c[3]++;
		if (s[i] == 'H')c[4]++;
	}
	printf("%lld",com(0));
	return 0;
}

Compiler output:
main.c:48:27: error: 'select' redeclared as different kind of symbol
   48 | int n, s = 0, c[5] = {0}, select[5] = {0};
      |                           ^~~~~~
In file included from /usr/include/x86_64-linux-gnu/sys/types.h:179,
                 from /usr/include/stdlib.h:514,
                 from main.c:5:
/usr/include/x86_64-linux-gnu/sys/select.h:102:12: note: previous declaration of 'select' with type 'int(int,  fd_set * restrict,  fd_set * restrict,  fd_set * restrict,  struct timeval * restrict)'
  102 | extern int select (int __nfds, fd_set *__restrict __readfds,
      |            ^~~~~~
Language: C

#define _CRT_SECURE_NO_WARNINGS

#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <math.h>

/* define */
#define Yes(X) puts ( (X) ? "Yes" : "No")
#define YES(X) puts ( (X) ? "YES" : "NO")
#define FOR(i, a, b) for ( int i = (a); i < (b) ; i++)
#define REP(i, n) for ( int i = 0; i < (n) ; i++)
#define max(a, b) (((a) > (b)) ? (a) : (b))
#define min(a, b) (((a) < (b)) ? (a) : (b))
#define max3(a, b, c) ((max((a), (b)) > (c)) ? max((a), (b)) : (c))
#define min3(a, b, c) ((min((a), (b)) < (c)) ? min((a), (b)) : (c))

/* const */
const int MOD = 1000000007;

/* alias */
typedef long long ll;
typedef unsigned  u;

/* function */
int cmp(const void *a, const void *b) {
	return *(int*)a - *(int*)b;
}
int cmp2(const void *a, const void *b) {
	return *(int*)b - *(int*)a;
}
int gcd(int a, int b) {
	if (b != 0)return gcd(b, a % b);
	return a;
}
ll Lgcd(ll a, ll b) {
	if (b != 0) return Lgcd(b, a % b);
	return a;
}
int lcm(int a, int b) {
	return a / gcd(a, b) * b;
}
ll Llcm(ll a, ll b) {
	return a / Lgcd(a, b) * b;
}

/* main */
int n, s = 0, c[5] = {}, select[5] = {};
ll ans = 0;
ll com(int x) {
	if (s == 3) {
		int m = 1;
		REP(i, 5) if (select[i] == 1)m *= c[i];
		ans += m;
		return 0;
	}
	for(int i = x; i < n; i++) {
		if (select[i] == 0) {
			select[i]++;
			s++;
			com(i);
			select[i]--;
			s--;
		}
	}
	return ans;
}

int main() {
	char s[100000];
	scanf("%d%*c", &n);
	REP(i, n) {
		scanf("%s", &s[i]);
		if (s[i] == 'M')c[0]++;
		if (s[i] == 'A')c[1]++;
		if (s[i] == 'R')c[2]++;
		if (s[i] == 'C')c[3]++;
		if (s[i] == 'H')c[4]++;
	}
	printf("%lld",com(0));
	return 0;
}

Compiler output:
main.c:48:26: error: 'select' redeclared as different kind of symbol
   48 | int n, s = 0, c[5] = {}, select[5] = {};
      |                          ^~~~~~
In file included from /usr/include/x86_64-linux-gnu/sys/types.h:179,
                 from /usr/include/stdlib.h:514,
                 from main.c:5:
/usr/include/x86_64-linux-gnu/sys/select.h:102:12: note: previous declaration of 'select' with type 'int(int,  fd_set * restrict,  fd_set * restrict,  fd_set * restrict,  struct timeval * restrict)'
  102 | extern int select (int __nfds, fd_set *__restrict __readfds,
      |            ^~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main() {
  int n, i, m = 0, a = 0, r = 0, c = 0, h = 0;
  cin >> n;
  
  string s;
  for(i = 0; i < n; i++){
    cin >> s;
    if(s.at(0) == "M") m++;
    if(s.at(0) == "A") a++;
    if(s.at(0) == "R") r++;
    if(s.at(0) == "C") c++;
    if(s.at(0) == "H") h++;
  }
  
  long long ans = 0;
  ans += m * a * r + m * a * c + m * a * h + m * r * c + m * r * h
    + m * c * h + a * r * c + a * r * h + a * c * h + r * c * h;
  
  cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:16: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   11 |     if(s.at(0) == "M") m++;
      |        ~~~~~~~~^~~~~~
a.cc:12:16: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   12 |     if(s.at(0) == "A") a++;
      |        ~~~~~~~~^~~~~~
a.cc:13:16: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   13 |     if(s.at(0) == "R") r++;
      |        ~~~~~~~~^~~~~~
a.cc:14:16: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   14 |     if(s.at(0) == "C") c++;
      |        ~~~~~~~~^~~~~~
a.cc:15:16: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   15 |     if(s.at(0) == "H") h++;
      |        ~~~~~~~~^~~~~~
Language: C++

#pragma GCC optimize "-O3"
#pragma GCC target ("avx")
#define _USE_MATH_DEFINES
#include<bits/stdc++.h>
#define int long long
#define rep(i,n) for(int i=0;i!=n;++i)
#define vi vector<int>
#define vvi vector<vi>
#define pb push_back
#define pi pair<int,int>
#define vp vector<pair<int,int>>
#define mp make_pair
#define all(v) (v).begin(),(v).end()
#define fi first
#define se second
#define MEMSET(a) memset(a,0,sizeof(a))
#define inf (1ll<<60)
#define SORT(v) sort(all(v))
#define RSORT(v) sort(all(v),greater<int>())
signed gcd(int a, int b){return b?gcd(b,a%b):a;}

using namespace std;

const int mod=1e9+7;

void run();
int fact(int n);
int combi(int n, int r);

void init() {
    ios::sync_with_stdio(false);
    cin.tie(0);
    cout<<fixed<<setprecision(12);
}

signed main(){
    init();
    run();
    return 0;
}

void run(){
    int n;
    cin >> n;
    vi march(n,0);
    string s;
    rep(i,n)
    {
        cin >> s;
        if(s[0]!='M'&&s[0]!='A'&&s[0]!='R'&&s[0]!='C'&&s[0]!='H')continue;
        if(s[0]=='M')++march[0];
        if(s[0]=='A')++march[1];
        if(s[0]=='R')++march[2];
        if(s[0]=='C')++march[3];
        if(s[0]=='H')++march[4];
    }
    int ans=0;
    rep(i,5)
    {
        if(march[i]>=1)++ans;
    }
    ans = combi(ans,3);
    rep(i,5)
    {
        if(march[i]>=2)
        {
            for(int j=1;j<march[i];++j)
            {
                ans += j=1;j<march[i];++j)
            {
                ans += ans-j;
            }
        }
    }

    cout << ans << endl;

}

//階乗を計算してくれる関数
int fact(int n){
    int sum=1;
    for(int i = 1; i <= n; ++i)
    {
        sum*=i;
    }
    return sum;
}

//n個からr個を選ぶ選び方の数を計算してくれる関数
int combi(int n,int r){
    int num=1;
    num = fact(n)/fact(r)/fact(n-r);
    return num;
}


Compiler output:
a.cc: In function 'void run()':
a.cc:69:42: error: expected ';' before ')' token
   69 |                 ans += j=1;j<march[i];++j)
      |                                          ^
      |                                          ;
a.cc:81:16: error: a function-definition is not allowed here before '{' token
   81 | int fact(int n){
      |                ^
a.cc:91:23: error: a function-definition is not allowed here before '{' token
   91 | int combi(int n,int r){
      |                       ^
a.cc:95:2: error: expected '}' at end of input
   95 | }
      |  ^
a.cc:42:11: note: to match this '{'
   42 | void run(){
      |           ^
Language: C++

#include <stdio.h>
#include <algorithm>
using namespace std;
struct comb{
    int a, b, c;
    ordenar(){
        int d=a, e=b, f=c;
        if(d > e){
            int aux = d;
            d = e;
            e = aux;
        }
        if(f < e){
            if(f > d){
                int aux = e;
                e = f;
                f = aux;
            } else {
                int aux = f;
                f = e;
                e = d;
                d = aux;

            }
        }
        a = d;
        b = e;
        c = f;
    }
};


int n, abc[6], cont = 0, com[4], values[6], idx = 0;
char word[20];
comb tot[200];

void f(int p, int v){
    if(p == 2){
        com[p] = v;
        tot[idx].a = com[0];
        tot[idx].b = com[1];
        tot[idx].c = com[2];
        tot[idx].ordenar();
        idx+=1;
        return;
    }
    com[p] = v;
    values[v] = 1;
    for(int i=1; i<=cont; i++){
        if(values[i] == 0){
            f(p+1, i);
        }
    }
    values[v] = 0;
}

bool compare(comb uno, comb dos){
    if(uno.a == dos.a){
        if(uno.b == dos.b){
            return uno.c < dos.c;
        } else {
            return uno.b < dos.b;
        }
    } else {
        return uno.a < dos.a;
    }
}

int main(){
    scanf("%d", &n);
    for(int i=0; i<n; i++){
        scanf("%s", word);
        if(word[0] == 'M')
            abc[0] += 1;
        else if(word[0] == 'A')
            abc[1] += 1;
        else if(word[0] == 'R')
            abc[2] += 1;
        else if(word[0] == 'C')
            abc[3] += 1;
        else if(word[0] == 'H')
            abc[4] += 1;
    }
    int  x=1, y=1, m=1, id=0;
    for(int i=0; i<5; i++){
        if(abc[i] > 0){
            cont += 1;
            m*=abc[i];
            abc[id] = abc[i];
            id+=1;
        }
    }
    for(int i=1; i<=cont; i++)
        x = x*i;
    for(int i=1; i<=(cont - 3); i++)
        y = y*i;
    x = (x/(y*6));
    for(int i=1; i<=cont; i++){
        f(0, i);
    }
    sort(tot, tot+idx, compare);
    //values[0] = tot[0].a; values[1] = tot[0].b; values[2] = tot[0].c;
int k=0;
    for(int i=0; i<idx; i++){
        if(tot[i].a == values[0] && tot[i].b== values[1] && tot[i].c == values[2]){

        } else {
            values[0] = tot[i].a; values[1] = tot[i].b; values[2] = tot[i].c;
            int z=abc[values[0]-1]*abc[values[1]-1]*abc[values[2]-1];
            k += z;
            //printf("%d\n", z);
            //printf("%d %d %d\n", tot[i].a, tot[i].b, tot[i].c);
        }

    }
    printf("%d\n", k);
}


Compiler output:
a.cc:6:5: error: ISO C++ forbids declaration of 'ordenar' with no type [-fpermissive]
    6 |     ordenar(){
      |     ^~~~~~~
a.cc: In member function 'int comb::ordenar()':
a.cc:29:5: warning: no return statement in function returning non-void [-Wreturn-type]
   29 |     }
      |     ^
Language: C++

//------------------------------------------
// C++ templete 
//------------------------------------------
#include <bits/stdc++.h>
using namespace std;
using ll = long long;

#define endl "\n"

//typedef
//------------------------------------------
typedef pair<int, int> PII;
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<string> VS;
typedef vector<PII> VP;
typedef long long int;
//REPEAT
//------------------------------------------
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n)  FOR(i,0,n)

//container util
//------------------------------------------
#define pb push_back
#define paired make_pair
#define ALL(a) (a).begin(),(a).end()
#define PRINT(V) for (auto v : (V)) cout << v << " "
#define SORT(V) sort((V).begin(),(V).end())
#define RSORT(V) sort((V).rbegin(), (V).rend())

//constant
//------------------------------------------
const int MOD = 1000000007;
const int INF = 1061109567;
const double EPS = 1e-10;
const double PI  = acos(-1.0);
int dx[4]={1,0,-1,0};
int dy[4]={0,1,0,-1};

//math
//------------------------------------------
int QP(int a,int b){int ans=1;do{if(b&1)ans=1ll*ans*a%MOD;a=1ll*a*a%MOD;}while(b>>=1);return ans;}
int QP(int a,int b,int MOD){int ans=1;do{if(b&1)ans=1ll*ans*a%MOD;a=1ll*a*a%MOD;}while(b>>=1);return ans;}
int GCD(int a,int b){return b?GCD(b,a%b):a;}

//debug
//------------------------------------------
#define dump(x)  cerr << #x << " = " << (x) << endl;
#define debug(x) cerr << #x << " = " << (x) << " (L" << __LINE__ << ")" << " " << __FILE__ << endl;

//grobal variable
//------------------------------------------
int N,M;
VI Vec;

//動的計画法で役に立つ関数
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }

//最大公約数と最小公倍数
ll gcd(ll a, ll b) {
    if(b==0)return a;
    return gcd(b, a%b);
}

ll lcm(ll a, ll b) {
  ll g = gcd(a, b);
  return a/g*b;
}

vector<vector<long long> > comb(int n) {
  vector<vector<long long> > v(n + 1,vector<long long>(n + 1, 0));
  for (int i = 0; i < v.size(); i++) {
    v[i][0] = 1;
    v[i][i] = 1;
  }
  for (int j = 1; j < v.size(); j++) {
    for (int k = 1; k < j; k++) {
      v[j][k] = (v[j - 1][k - 1] + v[j - 1][k]);
    }
  }
  return v;
}

int main() 
{
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    
    int N;cin >> N;
    
    int m=0, a=0, r=0, c=0, h=0;
    REP(i,N)
    {
        string S; cin >> S;
        if (S[0]=='M') m++;
        else if (S[0]=='A') a++;
        else if (S[0]=='R') r++;
        else if (S[0]=='C') c++;
        else if (S[0]=='H') h++;
    }
    int counter=0;
    VI V{m,a,r,c,h};
    REP(i, 5)
    {
        REP(j,5)
        {
            if (i > j)
            {
            REP(k,5)
            {
                if (j > k)
                {
                    counter += V[i]*V[j]*V[k];        
                }
            }
            }
        }
    }
    cout << counter << endl;
    return 0;
}



Compiler output:
a.cc:17:19: error: declaration does not declare anything [-fpermissive]
   17 | typedef long long int;
      |                   ^~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int n;string s;map<char,long>a;
int main(){
    cin>>n;
    for(int i=0;i<n;i++)cin>>s,a[s[0]]++;
    long m=a['M'],a=a['A'],r=a['R'],c=a['C'],h=a['H'];
    cout<<m*a*(r+c+h)+(m+a+r)*c*h+(m+a)*r*(c+h);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:22: error: invalid types 'long int[char]' for array subscript
    7 |     long m=a['M'],a=a['A'],r=a['R'],c=a['C'],h=a['H'];
      |                      ^
a.cc:8:16: error: 'r' was not declared in this scope
    8 |     cout<<m*a*(r+c+h)+(m+a+r)*c*h+(m+a)*r*(c+h);
      |                ^
a.cc:8:18: error: 'c' was not declared in this scope
    8 |     cout<<m*a*(r+c+h)+(m+a+r)*c*h+(m+a)*r*(c+h);
      |                  ^
a.cc:8:20: error: 'h' was not declared in this scope
    8 |     cout<<m*a*(r+c+h)+(m+a+r)*c*h+(m+a)*r*(c+h);
      |                    ^
Language: C++

#include <iostream>
#include <vector>
#include <map>

using namespace std;

int main(){
  int  N;
  cin >> N;
  vector<string> name(N);
  map m<char, int>;
  for(int i = 0; i < N; i++){
    cin >> name[i];
    m[name[i][0]]++;
  }
  string  march = "MARCH";
  long long int ans = 0LL;
  for(int i = 0; i < march.size(); i++){
    for(int j = i + 1; j < march.size(); j++){
      for(int k = j + 1; k < march.size(); k++){
        ans += m[march[i]] * m[march[j]] * m[march[k]];
      }
    }
  }
  cout << ans;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:8: error: expected initializer before '<' token
   11 |   map m<char, int>;
      |        ^
a.cc:14:5: error: 'm' was not declared in this scope
   14 |     m[name[i][0]]++;
      |     ^
a.cc:21:16: error: 'm' was not declared in this scope
   21 |         ans += m[march[i]] * m[march[j]] * m[march[k]];
      |                ^
Language: Java

#include <bits/stdc++.h>
using namespace std;

int main()
{
    int n;
    cin>>n;
    vector<string> s(n);
    int aa=0,bb=0,cc=0,dd=0,ee=0;
    string x;
    for(int i=0;i<n;i++){
        x=s.at(i);
        if(x[0]=='M'){
            aa++;
        }
        if(x[0]=='R'){
            bb++;
        }
        if(x[0]=='C'){
            cc++;
        }
        if(x[0]=='A'){
            dd++;
        }
        if(x[0]=='H'){
            ee++;
        }
    }
    long long ans=0;
    ans+=aa*bb*cc;
    ans+=aa*bb*dd;
    ans+=aa*bb*ee;
    ans+=aa*cc*dd;
    ans+=aa*cc*ee;
    ans+=aa*dd*ee;
    ans+=bb*cc*dd;
    ans+=bb*cc*ee;
    ans+=bb*dd*ee;
    ans+=cc*dd*ee;
    cout<<ans<<endl;
    
}


Compiler output:
Main.java:1: error: illegal character: '#'
#include <bits/stdc++.h>
^
Main.java:1: error: class, interface, enum, or record expected
#include <bits/stdc++.h>
         ^
Main.java:7: error: not a statement
    cin>>n;
       ^
Main.java:8: error: not a statement
    vector<string> s(n);
                     ^
Main.java:29: error: not a statement
    long long ans=0;
    ^
Main.java:40: error: not a statement
    cout<<ans<<endl;
             ^
Main.java:4: error: unnamed classes are a preview feature and are disabled by default.
int main()
^
  (use --enable-preview to enable unnamed classes)
Main.java:8: error: ';' expected
    vector<string> s(n);
                    ^
Main.java:8: error: ';' expected
    vector<string> s(n);
                      ^
Main.java:29: error: ';' expected
    long long ans=0;
        ^
10 errors