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

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

int main() {
  int N;
  cin >> N;
  int m[5]=0;
  int sum=0;
  for(int i=0;i<N;i++){
    string S;
    cin >> S;
    if(S[0]=='M')m[0]+=1;
    else if(S[0]=='A')m[1]+=1;
    else if(S[0]=='R')m[2]+=1;
    else if(S[0]=='C')m[3]+=1;
    else if(S[0]=='H')m[4]+=1;
  }
  for(int i=0;i<5;i++){
    for(int j=0;j<i;j++){
      for(int k=0;k<j;k++){
        sum+=m[i]*m[j]*m[k];
      }
    }
  }
  cout << sum;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:7:12: error: array must be initialized with a brace-enclosed initializer
    7 |   int m[5]=0;
      |            ^
Language: C++

#include <iostream>

using namespace std;

long long n;
long long ans;
long long num[5];

int main(){
    cin >> n;
    for(int i = 0; i < n; i++){
        string s;
        cin >> s;
        if(s[0] == 'M') num[0]++;
        else if(s[0] == 'A') num[1]++;
        else if(s[0] == 'R') num[2]++;
        else if(s[0] == 'C') num[3]++;
        else if(s[0] == 'H') num[4]++;
    }

    for(int i = 0; i < 5; i++){
        for(int j = i + 1; j < 5; j++){
            for(int k = j + 1; k < 5; k++){
                ans += m[i]*m[j]*m[k];
            }
        }
    }

    cout << ans << endl;

    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:24:24: error: 'm' was not declared in this scope
   24 |                 ans += m[i]*m[j]*m[k];
      |                        ^
Language: C++

#include <bits/stdc++.h>
#define itn int
#define rep(i, n) for (int i = 0; i < n; i++)
#define MOD 1000000007
using namespace std;
typedef long long ll;

const ll INF = 1LL << 60;

int main(){
    int n;
    cin >> n;
    vector<string> sv(n);
    string s="MARCH";
    set<char> st;
    int ans[5]={};
    rep(i,n){
        cin >> sv[i];
        int tmp=s.find(sv[i][0]);
        if(tmp!=-1){
            st.insert(s[tmp]);
            ans[tmp]++;
        }
    }
    int a=0;
    rep(i,3){
        int tmp=ans[i];
        for(int j=i+1;i!=4;i++){
            tmp*=ans[j];
            for(int k=j+1;k!=5;k++){
                tmp*=ans[k];
            }
        }
        a+=tmp;
    }
    cout << a << 3ndl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:36:18: error: unable to find numeric literal operator 'operator""ndl'
   36 |     cout << a << 3ndl;
      |                  ^~~~
Language: C++

#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;
    char x;
    for(int i=0;i<n;i++){
        x=s.at(i)[0];
        if(x=='M'){
            aa++;
        }
        if(x=='R'){
            bb++;
        }
        if(x=='C'){
            cc++;
        }
        if(x=='A'){
            dd++;
        }
        if(x=='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<<and<<endl;
    
}

Compiler output:
a.cc: In function 'int main()':
a.cc:40:14: error: expected identifier before '<<' token
   40 |     cout<<and<<endl;
      |              ^~
Language: C++

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

template <class T> using V = vector<T>;

using ll = long long;
using db = double;
using st = string;
using ch = char;
using vll = V<ll>;
using vpll =V<pair<ll,ll>>;
using vst = V<st>;
using vdb = V<db>;
using vch = V<ch>;


#define FOR(i,a,b) for(ll i=(a);i<(ll)(b);i++)
#define rFOR(i,a,b) for(ll i=(b);i>(ll)(a);i--)
#define oFOR(i,a,b) for(ll i=(a);i<(ll)(b);i+=2)
#define bgn begin()
#define en end()
#define SORT(a) sort((a).bgn,(a).en)
#define REV(a) reverse((a).bgn,(a).en)
#define M(a,b) max(a,b)
#define rM(a,b) min(a,b)
#define fi first
#define se second
#define sz size()
#define gcd(a,b) __gcd(a,b)
#define lcm(a,b) __lcm(a,b)
#define co(a) cout<<a<<endl;
#define ci(a) cin>>a;


ll sum(ll n) {
  ll m=0;
  FOR(i,0,12){
    m+=n%10;
    n/=10;
  }
  return m;
}


/****************************************\
| Thank you for viewing my code:)        |
| Written by RedSpica a.k.a. RanseMirage |
| Twitter:@asakaakasaka                  | 
\****************************************/


signed main() {
  ll n;
  	ci(n);
  vll A(5);
  FOR(i,0,n){
    st s;
    	ci(s);
    if(s[i]=='M'){
       A[0]++;
       }
    else if(s[i]=='A'){
      A[1]++;
    }
    else if(s[i]=='R'){
	  A[2]++;
    }
    else if(s[i]=='C'){
	  A[3]++;
    }
    else if(s[i]=='H'){
      A[4]++;
    }
  }
  ll ans=0;
  FOR(i,0,4){
    if(A[i]!==0){
      if(ans==0){
        ans++;
      }
	  ans*=A[i];
    }
  }
  co(ans)
}
    

Compiler output:
a.cc: In function 'int main()':
a.cc:78:14: error: expected primary-expression before '=' token
   78 |     if(A[i]!==0){
      |              ^
Language: C++

#include<iostream>
#include<string>
#include<vector>
#include<algorithm>
#include<bitset>
#include<map>
#include<stack>
#include<queue>
#include<iomanip>
using namespace std;
 
#define repr(i, a, b) for (int i = (int)(a); i < (int)(b); i++)
#define rep(i, n) repr(i, 0, n)
#define INF 2e9
#define MOD 1e9+7
#define LINF (long long)4e18

int main(){
    int N; cin >> N;
    vector<string> S(N);
    rep(i,N)cih >> S[i];
    long long ans = 0;
    vector<int> T(5);
    rep(i,N){
        if(S[i][0] == 'M') T[0]++;
        if(S[i][0] == 'A') T[1]++;
        if(S[i][0] == 'R') T[2]++;
        if(S[i][0] == 'C') T[3]++;
        if(S[i][0] == 'H') T[4]++;
    }
    rep(i,3){
        repr(j,i+1,4){
            repr(k,j+1,5){
                ans += (long long)(T[i] * T[j] * T[k]);
            }
        }
    }
    cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:13: error: 'cih' was not declared in this scope
   21 |     rep(i,N)cih >> S[i];
      |             ^~~
Language: C++

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

int main() {
  int m,a,r,c,h,n;
  cin >> n;
  m = 0;
  a = 0;
  r = 0;
  c = 0;
  h = 0;
  vector<string> names(n);
  for(int i=0;i<n;i++){
    cin >> names.at(i);
    if(names.at(i).at(0) == 'M'){
      m++;
    }
    else if(names.at(i).at(0) == 'A'){
      a++;
    }
    else if(names.at(i).at(0) == 'R'){
      r++;
    }
    else if(names.at(i).at(0) == 'C'){
      c++;
    }
    else if(names.at(i).at(0) == 'H'){
      h++;
    }
  }
  
  long x;
  x = 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 << x << endl;
}


Compiler output:
a.cc:1:2: error: invalid preprocessing directive #icnlude; did you mean #include?
    1 | #icnlude <bits/stdc++.h>
      |  ^~~~~~~
      |  include
a.cc: In function 'int main()':
a.cc:6:3: error: 'cin' was not declared in this scope
    6 |   cin >> n;
      |   ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | #icnlude <bits/stdc++.h>
a.cc:12:3: error: 'vector' was not declared in this scope
   12 |   vector<string> names(n);
      |   ^~~~~~
a.cc:1:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
  +++ |+#include <vector>
    1 | #icnlude <bits/stdc++.h>
a.cc:12:10: error: 'string' was not declared in this scope
   12 |   vector<string> names(n);
      |          ^~~~~~
a.cc:1:1: note: 'std::string' is defined in header '<string>'; this is probably fixable by adding '#include <string>'
  +++ |+#include <string>
    1 | #icnlude <bits/stdc++.h>
a.cc:12:18: error: 'names' was not declared in this scope
   12 |   vector<string> names(n);
      |                  ^~~~~
a.cc:34:3: error: 'cout' was not declared in this scope
   34 |   cout << x << endl;
      |   ^~~~
a.cc:34:3: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:34:16: error: 'endl' was not declared in this scope
   34 |   cout << x << endl;
      |                ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | #icnlude <bits/stdc++.h>
Language: C++

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

int main() {
  int m,a,r,c,h,n;
  cin >> n;
  m = 0;
  a = 0;
  r = 0;
  c = 0;
  h = 0;
  vector<string> name(n);
  for(int i=0;i<n;i++){
    cin >> name.at(i);
    if(name.at(i).at(0) == 'M'){
      m++;
    }
    else if(name.at(i).at(0) == 'A'){
      a++;
    }
    else if(name.at(i).at(0) == 'R'){
      r++;
    }
    else if(name.at(i).at(0) == 'C'){
      c++;
    }
    else if(name.at(i).at(0) == 'H'){
      h++;
    }
  }
  
  long x;
  x = 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 << x << endl;
}


Compiler output:
a.cc:1:2: error: invalid preprocessing directive #icnlude; did you mean #include?
    1 | #icnlude <bits/stdc++.h>
      |  ^~~~~~~
      |  include
a.cc: In function 'int main()':
a.cc:6:3: error: 'cin' was not declared in this scope
    6 |   cin >> n;
      |   ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | #icnlude <bits/stdc++.h>
a.cc:12:3: error: 'vector' was not declared in this scope
   12 |   vector<string> name(n);
      |   ^~~~~~
a.cc:1:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
  +++ |+#include <vector>
    1 | #icnlude <bits/stdc++.h>
a.cc:12:10: error: 'string' was not declared in this scope
   12 |   vector<string> name(n);
      |          ^~~~~~
a.cc:1:1: note: 'std::string' is defined in header '<string>'; this is probably fixable by adding '#include <string>'
  +++ |+#include <string>
    1 | #icnlude <bits/stdc++.h>
a.cc:12:18: error: 'name' was not declared in this scope
   12 |   vector<string> name(n);
      |                  ^~~~
a.cc:34:3: error: 'cout' was not declared in this scope
   34 |   cout << x << endl;
      |   ^~~~
a.cc:34:3: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:34:16: error: 'endl' was not declared in this scope
   34 |   cout << x << endl;
      |                ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | #icnlude <bits/stdc++.h>
Language: C++

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

int main() {
  int m,a,r,c,h,n;
  cin >> n;
  m = 0;
  a = 0;
  r = 0;
  c = 0;
  h = 0;
  vector<string> name(n);
  for(int i=0;i<n;i++){
    cin >> name.at(i);
    if(nema.at(i).at(0) == 'M'){
      m++;
    }
    else if(name.at(i).at(0) == 'A'){
      a++;
    }
    else if(name.at(i).at(0) == 'R'){
      r++;
    }
    else if(name.at(i).at(0) == 'C'){
      c++;
    }
    else if(name.at(i).at(0) == 'H'){
      h++;
    }
  }
  
  long x;
  x = 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 << x << endl;
}


Compiler output:
a.cc:1:2: error: invalid preprocessing directive #icnlude; did you mean #include?
    1 | #icnlude <bits/stdc++.h>
      |  ^~~~~~~
      |  include
a.cc: In function 'int main()':
a.cc:6:3: error: 'cin' was not declared in this scope
    6 |   cin >> n;
      |   ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | #icnlude <bits/stdc++.h>
a.cc:12:3: error: 'vector' was not declared in this scope
   12 |   vector<string> name(n);
      |   ^~~~~~
a.cc:1:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
  +++ |+#include <vector>
    1 | #icnlude <bits/stdc++.h>
a.cc:12:10: error: 'string' was not declared in this scope
   12 |   vector<string> name(n);
      |          ^~~~~~
a.cc:1:1: note: 'std::string' is defined in header '<string>'; this is probably fixable by adding '#include <string>'
  +++ |+#include <string>
    1 | #icnlude <bits/stdc++.h>
a.cc:12:18: error: 'name' was not declared in this scope
   12 |   vector<string> name(n);
      |                  ^~~~
a.cc:15:8: error: 'nema' was not declared in this scope
   15 |     if(nema.at(i).at(0) == 'M'){
      |        ^~~~
a.cc:34:3: error: 'cout' was not declared in this scope
   34 |   cout << x << endl;
      |   ^~~~
a.cc:34:3: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:34:16: error: 'endl' was not declared in this scope
   34 |   cout << x << endl;
      |                ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | #icnlude <bits/stdc++.h>
Language: C

#include <iostream>
#include <stack>
#include <algorithm>
#include <vector>
#include <math.h>
#include <stdio.h>
#include <functional>
#include <string>
#include <cstdlib>
#include <numeric>
#include <cstdbool>
#include <map> 
#include<set>
#include<queue>

typedef long long ll;


#define rep(i,n) for(ll i=0;i<n;i++)
using namespace std;

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; }

const long long INF = 1000000000000000;
const ll inf = -1e18;
typedef pair<int, int> P;
ll ma = 1000000000 + 7;
ll h, w, n,k,m; string s,t;
char maze[60][60];
int dis[101][101]; int graph[52][52]; bool vis[52];
int dx[4] = { 1, 0, -1, 0 };
int dy[4] = { 0, 1, 0, -1 };
ll gcd(ll x, ll y) {
	if (x % y == 0) return y;
	return gcd(y, x % y);

}
ll lcm(ll a,ll b) {
	ll g = gcd(a, b);
	return a / g * b;
}
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 };
ll a, r, c;
int main() {
	cin >> n; vector<int> D(5); ll res = 0;
	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;
	for (int d = 0; d < 10; d++)
		res += D[p[d]] * D[Q[d]] * D[R[d]];
	cout << res << endl;
}

Compiler output:
main.c:1:10: fatal error: iostream: No such file or directory
    1 | #include <iostream>
      |          ^~~~~~~~~~
compilation terminated.
Language: C++

#include <iostream>
#include <stack>
#include <algorithm>
#include <vector>
#include <math.h>
#include <stdio.h>
#include <functional>
#include <string>
#include <cstdlib>
#include <numeric>
#include <cstdbool>
#include <map> 
#include<set>
#include<queue>

typedef long long ll;


#define rep(i,n) for(ll i=0;i<n;i++)
using namespace std;

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; }

const long long INF = 1000000000000000;
const ll inf = -1e18;
typedef pair<int, int> P;
ll ma = 1000000000 + 7;
ll h, w, n,k,m; string s,t;
char maze[60][60];
int dis[101][101]; int graph[52][52]; bool vis[52];
int dx[4] = { 1, 0, -1, 0 };
int dy[4] = { 0, 1, 0, -1 };
ll gcd(ll x, ll y) {
	if (x % y == 0) return y;
	return gcd(y, x % y);

}
ll lcm(ll a,ll b) {
	ll g = gcd(a, b);
	return a / g * b;
}
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() {
	cin >> n; vector<int> mo(5); ll res = 0;
	rep(i, n) {
		string a;
		cin >> a;
		if (a[0] == 'M')mo[0]++;
		else if (a[0] == 'A')mo[1]++;
		else if (a[0] == 'R')mo[2]++;
		else if (a[0] == 'C')mo[3]++;
		else if (a[0] == 'H')mo[4]++;
	}
	rep(i, 10) {
		res += mo[P[i]] * mo[Q[i]] * mo[R[i]];
	}
	cout << res << endl;
}

Compiler output:
a.cc:43:9: error: 'int P [10]' redeclared as different kind of entity
   43 | int P[10] = { 0 ,0 ,0 ,0 ,0 ,0 ,1 ,1 ,1 ,2 };
      |         ^
a.cc:27:24: note: previous declaration 'typedef struct std::pair<int, int> P'
   27 | typedef pair<int, int> P;
      |                        ^
a.cc: In function 'int main()':
a.cc:59:28: error: expected primary-expression before '[' token
   59 |                 res += mo[P[i]] * mo[Q[i]] * mo[R[i]];
      |                            ^
Language: C++

#include<iostream>
#include<string>
#include<cstring>
using namespace std;
int name[5], n;
int main(){
  cin >> n;
  memset(name, 0, sizeof(name));
  for(int i=0; i<n; i++){
    string s;
    cin >> s;
    if(s[0] == 'M') name[0]++;
    else if(s[1] == 'A') name[1]++;
    else if(s[2] == 'R') name[2]++;
    else if(s[3] == 'C') name[3]++;
    else if(s[4] == 'H') name[4]++;
    }
  long long ret = 0;
  for(int i=0; i<5; i++){
    for(int j=i+1; j<5; j++){
      for(int k=j+1; k<5; k++){
        ret += name[i] * name[j] * s[k];
        }
      }
    }
  cout << ret << endl;
  return 0;
  }

Compiler output:
a.cc: In function 'int main()':
a.cc:22:36: error: 's' was not declared in this scope
   22 |         ret += name[i] * name[j] * s[k];
      |                                    ^
Language: C++

#include<iostream>
#include<string>
#include<cstring>
using namespace std;
int name[5], n;
int main(){
  cin >> n;
  memset(name, 0, sizeof(name));
  for(int i=0; i<n; i++){
    string s;
    cin >> s;
    if(s[0] == 'M') name[0]++;
    else if(s[1] == 'A') name[1]++;
    else if(s[2] == 'R') name[2]++;
    else if(s[3] == 'C') name[3]++;
    else if(s[4] == 'H') name[4]++;
    }
  long long ret = 0;
  for(int i=0; i<5; i++){
    for(int j=i+1; j<5; j++){
      for(int k=j+1; k<5; k++){
        ret += s[i] * s[j] * s[k];
        }
      }
    }
  cout << ret << endl;
  return 0;
  }

Compiler output:
a.cc: In function 'int main()':
a.cc:22:16: error: 's' was not declared in this scope
   22 |         ret += s[i] * s[j] * s[k];
      |                ^
Language: C

#include<stdio.h>

int main(){
  int i,j,k;
  int N;
  
  scanf("%d",&N);
  long A[5];
  
  for(i=0;i<5;i++)
    A[i]=0;
  
  char S[N][10];
  
  for(i=0;i<N;i++){
    scanf("%s",S[i]);
    if(S[i][0]='M')
      A[0]++;
    else if(S[i][0]=='A')
      A[1]++;
    else if(S[i][0]=='R')
      A[2]++;
    else if(S[i][0]=='C')
      A[3]++;
    else if(S[i][0]=='H')
      A[4]++;
    else
      continue;
  }
  long ans=0;
  ans += A[0]*A[1]*A[2];
  ans += A[1]*A[2]*A[3];
  ans += A[2]*A[3]*A[4];
  ans += A[0]*A[2]*A[3];
  ans += A[0]*A[3]*A[4];
  ans += A[0]*A[1]*A[3];
  ans += A[0]*A[1]*A[4];
  ans += A[1]*A[3]*A[4];
  ans += A[0]*A[2]*A[4];
  ans += A[1]*A[2]*A[4];
  printf("%ld\n",ans);
  return 0;
}
  }
  

Compiler output:
main.c:44:3: error: expected identifier or '(' before '}' token
   44 |   }
      |   ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
typedef long long int ll;

int main(){
  int n,m=0,a=0,r=0,c=0,h=0,sum;
  ll count;
  cin >> n;
  vector<string> S(n);
  for(int i=0;i<n;i++){
    cin >> S.at(i);
    if(S.at(i)[0]=='M')m++;
    else if(S.at(i)[0]=='A')a++;
    else if(S.at(i)[0]=='R')r++;
    else if(S.at(i)[0]=='C')c++;
    else if(S.at(i)[0]=='H')h++;
  }
  sum = m+a+r+c+h;
  count = {sum*(sum-1)*(sum-2)/6} - (sum-2)/2*{m*(m-1)+a*(a-1)+r*(r-1)+c*(c-1)+h*(h-1)};
  cout << count << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:19:34: error: expected ';' before '-' token
   19 |   count = {sum*(sum-1)*(sum-2)/6} - (sum-2)/2*{m*(m-1)+a*(a-1)+r*(r-1)+c*(c-1)+h*(h-1)};
      |                                  ^~
      |                                  ;
Language: C++

#include <bits/stdc++.h>
using namespace std;
typedef long long int ll;

int main(){
  int n,m=0,a=0,r=0,c=0,h=0,sum;
  ll count;
  cin >> n;
  vector<string> S(n);
  for(int i=0;i<n;i++){
    cin >> S.at(i);
    if(S.at(i)[0]=='M')m++;
    else if(S.at(i)[0]=='A')a++;
    else if(S.at(i)[0]=='R')r++;
    else if(S.at(i)[0]=='C')c++;
    else if(S.at(i)[0]=='H')h++;
  }
  sum = m+a+r+c+h;
  count = sum*(sum-1)*(sum-2)/6-(sum-2)/2*{m*(m-1)+a*(a-1)+r*(r-1)+c*(c-1)+h*(h-1)};
  cout << count << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:19:43: error: expected primary-expression before '{' token
   19 |   count = sum*(sum-1)*(sum-2)/6-(sum-2)/2*{m*(m-1)+a*(a-1)+r*(r-1)+c*(c-1)+h*(h-1)};
      |                                           ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
typedef long long int ll;

int main(){
  int n,m=0,a=0,r=0,c=0,h=0,sum;
  ll count;
  cin >> n;
  vector<string> S(n);
  for(int i=0;i<n;i++){
    cin >> S.at(i);
    if(S.at(i)[0]=='M')m++;
    else if(S.at(i)[0]=='A')a++;
    else if(S.at(i)[0]=='R')r++;
    else if(S.at(i)[0]=='C')c++;
    else if(S.at(i)[0]=='H')h++;
  }
  sum = m+a+r+c+h;
  count = {sum*(sum-1)*(sum-2)/6}-(sum-2)/2*{m*(m-1)+a*(a-1)+r*(r-1)+c*(c-1)+h*(h-1)};
  cout << count << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:19:34: error: expected ';' before '-' token
   19 |   count = {sum*(sum-1)*(sum-2)/6}-(sum-2)/2*{m*(m-1)+a*(a-1)+r*(r-1)+c*(c-1)+h*(h-1)};
      |                                  ^
      |                                  ;
Language: C++

#include <bits/stdc++>
using namespace std;
typedef long long int ll;

int main(){
  int n,m=0,a=0,r=0,c=0,h=0,sum;
  ll count;
  cin >> n;
  vector<string> S(n);
  for(int i=0;i<n;i++){
    cin >> S.at(i);
    if(S.at(i)[0]=='M')m++;
    else if(S.at(i)[0]=='A')a++;
    else if(S.at(i)[0]=='R')r++;
    else if(S.at(i)[0]=='C')c++;
    else if(S.at(i)[0]=='H')h++;
  }
  sum = m+a+r+c+h;
  count = {sum*(sum-1)*(sum-2)/6}-(sum-2)/2*{m*(m-1)+a*(a-1)+r*(r-1)+c*(c-1)+h*(h-1)};
  cout << count << endl;
}


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

from itertools import combinations as comb

B = [0,0,0,0,0]
for i in range(int(input())):
    z = input()[0]
    if z == 'M':
        B[0] += 1
    elif z == 'A':
        B[1] += 1
    elif z == 'R':
        B[2] += 1
    elif z == 'C':
        B[3] += 1
    elif z == 'H':
        B[4] += 1
ans = 0
for b in list(comb(B,3)):
    ans += b[0]*b[1]*b[2]
print(ans)

Compiler output:
a.cc:1:1: error: 'from' does not name a type
    1 | from itertools import combinations as comb
      | ^~~~
Language: C++

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

int main(){
  int N;
  cin >> N;
  int m = 0;
  int a = 0;
  int r = 0;
  int c = 0;
  int h = 0;
  int x;
  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++;
    }
  }
  x = 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 << x << endl;
}
  


Compiler output:
a.cc: In function 'int main()':
a.cc:16:13: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   16 |     if(s[0] == "M"){
a.cc:19:18: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   19 |     else if(s[0] == "A"){
a.cc:22:18: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   22 |     else if(s[0] == "R"){
a.cc:25:18: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   25 |     else if(s[0] == "C"){
a.cc:28:18: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   28 |     else if(s[0] == "H"){
Language: C++

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

int main(){
  int N;
  cin >> N;
  int m = 0;
  int a = 0;
  int r = 0;
  int c = 0;
  int h = 0;
  int x;
  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++;
    }
  }
  x = 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 << x << endl;
  

Compiler output:
a.cc: In function 'int main()':
a.cc:16:13: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   16 |     if(s[0] == "M"){
a.cc:19:18: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   19 |     else if(s[0] == "A"){
a.cc:22:18: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   22 |     else if(s[0] == "R"){
a.cc:25:18: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   25 |     else if(s[0] == "C"){
a.cc:28:18: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   28 |     else if(s[0] == "H"){
a.cc:33:21: error: expected '}' at end of input
   33 |   cout << x << endl;
      |                     ^
a.cc:4:11: note: to match this '{'
    4 | int main(){
      |           ^
Language: C++

#include <bits/stdc++.h>
#define rep(i, n) for(int i = 0; i < n; ++i)
#define repR(i, n) for(int i = n; i >= 0; ++i)
#define FDS(i, n) for(ll i = 0; i < n; ++i)
#define FDSR(i, n) for(int i = n; i >= 0; ++i)
#define FOR(i, m, n) for(int i = m; i < n; ++i)
#define FORR(i, m, n) for(int i = m;i >= n;--i)
#define VSORT(v) sort(v.begin(), v.end());
#define INF 999999999
#define itn int
#define ednl endl
using namespace std;
typedef long long ll;template<typename TypeInt>TypeInt G_C_D(TypeInt a, TypeInt b){if (a < 0) a = -a;if (b < 0) b = -b;while (b != 0) {a %= b;if (a == 0) return b;b %= a;}return a;}template<typename TypeInt>
TypeInt G_C_D(const std::vector<TypeInt> &list){TypeInt a = list[0];for (size_t i = 1; i < list.size(); ++i) {a = G_C_D(a, list[i]);}return a;}template<typename TypeInt>TypeInt L_C_M(TypeInt a, TypeInt b) {if( a == 0 && b == 0)return 0;return a / G_C_D(a, b) * b;}
template<typename TypeInt>TypeInt L_C_M(const std::vector<TypeInt> &list){TypeInt a = list[0];for (size_t i = 1; i < list.size(); ++i) {a = L_C_M(a, list[i]);}return a;}

int main(){
	int N;
	cin>>N;
	vector<string> S(N);
	FDS(i,N){
		cin>>S[i];
	}
	ll M,A,R,C,H;
	ll ans=0;
	FDS(i,N){
		if(S[i].at(0)=="M"){
			M++;
		}
		if(S[i].at(0)=="A"){
			A++;
		}
		if(S[i].at(0)=="R"){
			R++;
		}
		if(S[i].at(0)=="C"){
			C++;
		}
		if(S[i].at(0)=="H"){
			H++;
		}
	}
	ans+=M*A*R+A*R*C*+R*C*H+C*H*M+H+M+A;
	cout<<ans<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:27:30: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   27 |                 if(S[i].at(0)=="M"){
      |                    ~~~~~~~~~~^~~~~
a.cc:30:30: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   30 |                 if(S[i].at(0)=="A"){
      |                    ~~~~~~~~~~^~~~~
a.cc:33:30: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   33 |                 if(S[i].at(0)=="R"){
      |                    ~~~~~~~~~~^~~~~
a.cc:36:30: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   36 |                 if(S[i].at(0)=="C"){
      |                    ~~~~~~~~~~^~~~~
a.cc:39:30: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   39 |                 if(S[i].at(0)=="H"){
      |                    ~~~~~~~~~~^~~~~
Language: C++

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

int main(){
    int N;
    cin>>N;
    vector<string> s(N);
    for(int i=0;i<N;i++) cin>>s[i];

    long long vari[5] = {};
    long long cnt[5] ={};
    for(int i=0;i<N;i++){
        if(s[i][0]=='M'){
            cnt[0]+=1;
        }
        if(s[i][0]=='A'){
            cnt[1]+=1;
        }
        if(s[i][0]=='R'){
            cnt[2]+=1;
        }
        if(s[i][0]=='C'){
            cnt[3]+=1;
        }
        if(s[i][0]=='H'){
            cnt[4]+=1;
        }
    }

    int R[10]= {0,0,0,0,0,0,1,1,1,2};
    int P[10]= {1,1,1,2,2,3,2,2,3,3};
    int Q[10]= {2,3,4,3,4,4,3,4,4,4}
    long long ans =0;

    for(int i=0;i<10;i++){
        ans +=cnt[R[i]]*cnt[P[i]]*cnt[Q[i]];
    }

    cout<<ans<<endl;
    return 0;

        for(int i=0;i<5;i++) cout<<cnt[i]<<endl;
        int cn = accumulate(vari,vari+5,0);
        long long ans = 1;
        if(cn<3){
            cout<<"0"<<endl;
            return 0;
        }else if(cn==3){
            for(int i=0;i<N;i++){
                if(cnt[i]!=0){
                    ans *= cnt[i];
                }
            }
        }else if(cn==4){
            ans = 4;
            for(int i=0;i<N;i++){
                if(cnt[i]!=0){
                    ans *= cnt[i];
                }
            }
        }else if(cn==5){
            ans = 10;
            for(int i=0;i<N;i++){
                if(cnt[i]!=0){
                    ans *= cnt[i];
                }
            }
        }

        cout<<ans<<endl;
        return 0;


    
}

Compiler output:
a.cc: In function 'int main()':
a.cc:33:5: error: expected ',' or ';' before 'long'
   33 |     long long ans =0;
      |     ^~~~
a.cc:36:9: error: 'ans' was not declared in this scope; did you mean 'abs'?
   36 |         ans +=cnt[R[i]]*cnt[P[i]]*cnt[Q[i]];
      |         ^~~
      |         abs
a.cc:39:11: error: 'ans' was not declared in this scope; did you mean 'abs'?
   39 |     cout<<ans<<endl;
      |           ^~~
      |           abs
Language: Java

/*
* @Author Silviase(@silviasetitech)
* For ProCon
*/

import java.util.*;
import java.lang.*;
import java.math.*;

class Main{

    static int n;
    static int c;
    static int k;
    static int lef;
    static int rig;
    static String s;
    static String anss;
    static int[] times;
    static long ans;
    static int[] w;
    static int[] ww;
    static boolean[] visit;
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        
        n = sc.nextInt();
        ans = 0;
        String[] st = new String[n];
        long[] m = new long[5];
        for (int i = 0; i < n; i++) {
            st[i] = sc.next();
            if (st[i].charAt(0) == 'M') {
                m[0]++;
            }
            if (st[i].charAt(0) == 'A') {
                m[1]++;
            }
            if (st[i].charAt(0) == 'R') {
                m[2]++;
            }
            if (st[i].charAt(0) == 'C') {
                m[3]++;
            }
            if (st[i].charAt(0) == 'H') {
                m[4]++;
            }
        }

        System.out.println(
            m[0]*m[1]*(m[2]+m[3]+m[4]) + m[0]*m[2]*(m[3]+m[4]) + m[0]*m[3]*m[4]
                +m[1]*m[2]*(m[3]+m[4]) + m[1]*m[3]*m[4] + m[2]*m[3]*m[4]
        );

        
        sc.close();
    }

    public static long gcd(long a, long b) {
        
        if (a < b) {
            long tmpp = a;
            a = b;
            b = tmpp;
        }
        if (b == 0) {
            return a;
        }else{
            return gcd(b, a%b);
        }
    }

    public static long lcm(long a, long b) {
        long gcd = gcd(a,b);
        return a/gcd*b;
    }

    public static void dfs(int placenow) {
        // if went all -> success! 
        // if not went all -> fail...
        
        /*
         dfs
         Go All Place that there is way to and not having been yet. 

         if island 1 is start point, dfs(1);
         if there is way to island 2 and island 3,
         - island 2 changes non-visited -> visited, and dfs(2).
         - island 3 changes non-visited -> visited, and dfs(3).
         

        */

        visit[placenow] = true;
        boolean success = true;
        for (int i = 0; i < n; i++) {
            if (visit[i] == false) { // not go all place
                success = false;
                break;
            }
        }
        if (success) {
            ans++;
            visit[placenow] = false;
            return;
        }

        for (int i = 0; i < m; i++) {
            if (w[i] == placenow && visit[ww[i]] == false ) {
                dfs(ww[i]);
            }else if(ww[i] == placenow && visit[w[i]] == false){
                dfs(w[i]);
            }else{
                continue;
            }
        }
        visit[placenow] = false;
        return;
    }

}



Compiler output:
Main.java:108: error: cannot find symbol
        for (int i = 0; i < m; i++) {
                            ^
  symbol:   variable m
  location: class Main
1 error
Language: C++

#include <iostream>
#include <string.h>

using namespace std;
typedef long long int ll;

int main(){

    int N;
    cin >> N;
    char s[16];
    int p[256] = {};
    for (int i = 0; i < n; i++) {
        cin >> s;
        p[s[0]]++;
    }
 
    char *c = "MARCH";
    int64_t q[5];
    for (int i = 0; i < 5; i++) {
        q[i] = p[c[i]];
    }
    

    int64_t total = 0;
    total = q[0] * q[1] * q[2] + q[0] * q[1] * q[3] + q[0] * q[1] * q[4] + q[0] * q[2] * q[3] + q[0] * q[2] * q[4] + q[0] * q[3] * q[4] + q[1] * q[2] * q[3] + q[1] * q[2] * q[4] + q[1] * q[3] * q[4] + q[2] * q[3] * q[4];
    

    cout << total << endl;

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:25: error: 'n' was not declared in this scope
   13 |     for (int i = 0; i < n; i++) {
      |                         ^
a.cc:18:15: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
   18 |     char *c = "MARCH";
      |               ^~~~~~~
Language: C++

#include <iostream>
#include <string.h>

using namespace std;
typedef long long int ll;

int main(){

    int N;
    cin >> N;
    string name[N];
    int q[5];
    memset(char_count, 0, sizeof char_count);
    for(int i=0; i<N; i++){
        cin >> name[i];
        char first = name[i][0];
        if(first == 'M'){
            q[0] ++;
        }else if(first == 'A'){
            q[1] ++;
        }else if(first == 'R'){
            q[2] ++;
        }else if(first == 'C'){
            q[3] ++;
        }else if(first == 'H'){
            q[4] ++;
        }
    }

    ll total = 0;
    total = (ll)q[0] * q[1] * q[2] + (ll)q[0] * q[1] * q[3] + (ll)q[0] * q[1] * q[4] + (ll)q[0] * q[2] * q[3] + (ll)q[0] * q[2] * q[4] + (ll)q[0] * q[3] * q[4] + (ll)q[1] * q[2] * q[3] + (ll)q[1] * q[2] * q[4] + (ll)q[1] * q[3] * q[4] + (ll)q[2] * q[3] * q[4];
    

    cout << total << endl;

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:12: error: 'char_count' was not declared in this scope
   13 |     memset(char_count, 0, sizeof char_count);
      |            ^~~~~~~~~~
Language: C++

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

long long dint n;
string s[100000];

long long int matching_num=0;

long long int num[5];



int main(){

    cin>>n;

    for(int i=0;i<n;i++){
        cin>>s[i];
    }

for(int i=0;i<n;i++) {num[i]=0;}

for(int i=0;i<n;i++){
    if(s[i][0]=='M'){
        num[0]+=1;
    }
    else if(s[i][0]=='A'){
        num[1]+=1;
    }
    else if(s[i][0]=='R'){
        num[2]+=1;
    }
    else if(s[i][0]=='C'){
        num[3]+=1;
    }
    else if(s[i][0]=='H'){
        num[4]+=1;
    }
}



for(int i=0;i<5;i++){
    for(int j=i+1;j<5;j++){
        for(int k=j+1;k<5;k++){
            matching_num+=num[i]*num[j]*num[k];
        }
    }
}
    
cout<<matching_num<<endl;

}

Compiler output:
a.cc:4:16: error: expected initializer before 'n'
    4 | long long dint n;
      |                ^
a.cc: In function 'int main()':
a.cc:15:10: error: 'n' was not declared in this scope; did you mean 'yn'?
   15 |     cin>>n;
      |          ^
      |          yn
Language: C++

#include <iostream>
#include <set>
#include <map>
#include <vector>
#include <algorithm>
#include <iomanip>
#include <climits>
#include <numeric>
#include <cmath>
#include <queue>
#include <sstream>

using namespace std;
typedef long long ll;

int main() {
  int N;
  cin >> N;
  
  string k = "MARCH";
  ll cnt[5];
  memset(cnt, 0, sizeof(cnt));
  
  for (int i = 0; i < N; i++) {
    string s;
    cin >> s;
    for (int j = 0; j < 5; j++) {
      if (s[0] == k[j]) {
        cnt[j]++;
      }
    }
  }
  
  ll sum = 0;
  for (int i = 0; i < 5; i++) {
    for (int j = i + 1; j < 5; j++) {
      for (int k = j + 1; k < 5; k++) {
        sum += cnt[i] * cnt[j] * cnt[k];
      }
    }
  }
  cout << sum << endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:22:3: error: 'memset' was not declared in this scope
   22 |   memset(cnt, 0, sizeof(cnt));
      |   ^~~~~~
a.cc:11:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
   10 | #include <queue>
  +++ |+#include <cstring>
   11 | #include <sstream>
Language: Java

public class Main {
    private static java.util.Scanner scanner = new java.util.Scanner(System.in);

    public static void main(String[] args) {
        int n = scanner.nextInt();
        long m = 0, a = 0, r = 0, c = 0, h = 0;
        for (int i = 0; i < n; i++) {
            switch (scanner.next().charAt(0)) {
                case 'M': m++; continue;
                case 'A': a++; continue;
                case 'R': r++; continue;
                case 'C': c++; continue;
                case 'H': h++;
            }
        }
        System.out.println(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);
    }

Compiler output:
Main.java:17: error: reached end of file while parsing
    }
     ^
1 error
Language: C++

#include<map>
#include<set>
#include<stack>
#include<cmath>
#include<queue>
#include<cstdio>
#include<string>
#include<vector>
#include<cstring>
#include<iostream>
#include<algorithm>
#define inf 0x3f3f3f3f
using namespace std;

long long a[5], ans;

int main()
{
	int n;
	char s[11];
	scanf_s("%d", &n);
	for (int i = 1; i <= n; i++)
	{
		scanf("%s", s);
		if (s[0] == 'M') ++a[0];
		if (s[0] == 'A') ++a[1];
		if (s[0] == 'R') ++a[2];
		if (s[0] == 'C') ++a[3];
		if (s[0] == 'H') ++a[4];
	}   
	for (int i = 0; i <= 2; i++)
		for (int j = i + 1; j <= 3; j++)
			for (int k = j + 1; k <= 4; k++)
				ans += a[i] * a[j] * a[k];
	printf("%lld", ans);
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:9: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
   21 |         scanf_s("%d", &n);
      |         ^~~~~~~
      |         scanf
Language: C++

from collections import Counter
from itertools import combinations
N = int(input())
S = [input()[0] for _ in range(N)]
cnt = Counter(S)
ans = 0
for elem in combinations(list('MARCH'), 3):
    ans += cnt[elem[0]]*cnt[elem[1]]*cnt[elem[2]]
print(ans)



Compiler output:
a.cc:7:31: warning: multi-character literal with 5 characters exceeds 'int' size of 4 bytes
    7 | for elem in combinations(list('MARCH'), 3):
      |                               ^~~~~~~
a.cc:1:1: error: 'from' does not name a type
    1 | from collections import Counter
      | ^~~~
Language: C++

from collections import Counter
from itertools import combinations
N = int(input())
S = [input()[0] for _ in range(N)]
cnt = Counter(S)
ans = 0
for elem in combinations('MARCH', 3):
    ans += cnt[elem[0]]*cnt[elem[1]]*cnt[elem[2]]
print(ans)



Compiler output:
a.cc:7:26: warning: multi-character literal with 5 characters exceeds 'int' size of 4 bytes
    7 | for elem in combinations('MARCH', 3):
      |                          ^~~~~~~
a.cc:1:1: error: 'from' does not name a type
    1 | from collections import Counter
      | ^~~~
Language: Java

import java.util.*;

public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        long[] alp = new int[28];
        int[] id = {'M'-'A', 'A'-'A', 'R'-'A','C'-'A', 'H'-'A'};
        long ans = 0;
        for(int i = 0;i < N;i++)  alp[sc.next().charAt(0)-'A']++;
        for(int i = 0;i <= 2;i++){
            for(int j = i+1;j <= 3;j++){
                for(int k = j+1;k <= 4;k++){
                    ans += alp[id[i]]*alp[id[j]]*alp[id[k]];
                }
            }
        }
        System.out.println(ans);  
    }
}

Compiler output:
Main.java:7: error: incompatible types: int[] cannot be converted to long[]
        long[] alp = new int[28];
                     ^
1 error
Language: C++

#include<iostream>
#include<algorithm>
#include<string>
#include<map>
#include<vector>
using namespace std;
using ll = long long;
#define MM = 1000000000;
#define mod = MM + 7;
#define INF (ll)1e18
#define pi acos(-1.0)
#define MAX 100005
#define NIL -1
int main(){
    ll n; cin >> n;
    string s;
    map<char, ll> mp;
    ll cnt = 0; //C用
    ll ans = 1; //ans
    char G = {'M', 'A', 'R', 'C', 'H'};
    for(ll i = 0; i < n; i++){
        cin >> s;
        if(s[0]=='M'||s[0]=='A'||s[0]=='R'||s[0]=='C'||s[0]=='H'){
            mp[s[0]]++;
        }
    }
    for(int i = 0; i < 3; i++){
        for(int j = i+1; j < 4; j++){
            for(int k = j+1; k < 5; k++){
                ans *= mp[G[i]]*mp[G[j]]*mp[G[k]];
            }
        }
    }
    cout << ans << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:20:10: error: scalar object 'G' requires one element in initializer
   20 |     char G = {'M', 'A', 'R', 'C', 'H'};
      |          ^
Language: C++

#include<iostream>
#include<algorithm>
#include<string>
#include<map>
#include<vector>
using namespace std;
using ll = long long;
#define MM = 1000000000;
#define mod = MM + 7;
#define INF (ll)1e18
#define pi acos(-1.0)
#define MAX 100005
#define NIL -1
int main(){
    ll n; cin >> n;
    string s;
    map<char, ll> mp;
    ll cnt = 0; //C用
    ll ans = 1; //ans
    ll G = {'M', 'A', 'R', 'C', 'H'};
    for(ll i = 0; i < n; i++){
        cin >> s;
        if(s[0]=='M'||s[0]=='A'||s[0]=='R'||s[0]=='C'||s[0]=='H'){
            mp[s[0]]++;
        }
    }
    for(int i = 0; i < 3; i++){
        for(int j = i+1; j < 4; j++){
            for(int k = j+1; k < 5; k++){
                ans *= mp[G[i]]*mp[G[j]]*mp[G[k]];
            }
        }
    }
    cout << ans << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:20:8: error: scalar object 'G' requires one element in initializer
   20 |     ll G = {'M', 'A', 'R', 'C', 'H'};
      |        ^
Language: C++

#include <iostream>
#include<string>
#include<cmath>
#include<algorithm>
#include<cctype>
#include<queue>
#include<stack>
#include<stdio.h>
#include<vector>
#include<set>
#include<map>
#include<iomanip>
#define rep(i,n) for(int long long i=0;i<n;i++)
typedef int long long ll;
using namespace std;

int main(){
    ll n;
    cin>>n;
    ll o=1;
    int nm[5];
    rep(i,5){nm[i]=0;}
    for(int i=0;i<n;i++){
        string s;
        cin>>s;
        if(s[0]=='M'){
            nm[0]++;
        }else if(s[0]=='A'){
            nm[1]++;
        }else if(s[0]=='R'){
            nm[2]++;
        }else if(s[0]=='C'){
            nm[3]++;
        }else if(s[0]=='H'){
            nm[4]++;
        }
    }
    int kazu=0;
    rep(i,5){if(nm[i]!=0)kazu++;}
    if(kazu<=2){cout<<0<<endl;return 0;}
    ll ans=0;
    vector<int> v;
    if(kazu==3){
        rep(i,5){
            if(nm[i]!=0){
                v.push_back(nm[i]);
            }
        }
        ans+=v[0]*v[1]*v[2];
    }
    if(kazu==4){
        rep(i,5){
            if(nm[i]!=0){
                v.push_back(nm[i]);
            }
        }
        ans+=v[0]*v[1]*v[2]+v[0]*v[1]*v[3]+v[0]*v[2]*v[3]+v[1]*v[2]*v[3];
    }
    if(kazu==5){
        rep(i,5){
            if(nm[i]!=0){
                v.push_back(nm[i]);
            }
        }
        ans+=v[0]*v[1]*v[2]+v[0]*v[1]*v[3]+v[0]*v[1]*v[4]+v[0]*v[2]*v[3]+v[0]*v[2]*v[4]+v[0]*v[3]*[4]+v[1]*v[2]*v[3]+v[1]*v[2]*v[4]+v[1]*v[3]*v[4]+v[2]*v[3]*v[4];
    }
    cout<<ans<<endl;
    
  
    
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:65:100: error: expected identifier before numeric constant
   65 |         ans+=v[0]*v[1]*v[2]+v[0]*v[1]*v[3]+v[0]*v[1]*v[4]+v[0]*v[2]*v[3]+v[0]*v[2]*v[4]+v[0]*v[3]*[4]+v[1]*v[2]*v[3]+v[1]*v[2]*v[4]+v[1]*v[3]*v[4]+v[2]*v[3]*v[4];
      |                                                                                                    ^
a.cc: In lambda function:
a.cc:65:102: error: expected '{' before '+' token
   65 |         ans+=v[0]*v[1]*v[2]+v[0]*v[1]*v[3]+v[0]*v[1]*v[4]+v[0]*v[2]*v[3]+v[0]*v[2]*v[4]+v[0]*v[3]*[4]+v[1]*v[2]*v[3]+v[1]*v[2]*v[4]+v[1]*v[3]*v[4]+v[2]*v[3]*v[4];
      |                                                                                                      ^
a.cc: In function 'int main()':
a.cc:65:98: error: no match for 'operator*' (operand types are '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'} and 'main()::<lambda()>')
   65 |         ans+=v[0]*v[1]*v[2]+v[0]*v[1]*v[3]+v[0]*v[1]*v[4]+v[0]*v[2]*v[3]+v[0]*v[2]*v[4]+v[0]*v[3]*[4]+v[1]*v[2]*v[3]+v[1]*v[2]*v[4]+v[1]*v[3]*v[4]+v[2]*v[3]*v[4];
      |                                                                                                  ^~~~
      |                                                                                                   |
      |                                                                                                   main()::<lambda()>
Language: C

hash = {}
%w|M A R C H|.each{ |c| hash[c] = 0 }

gets.to_i.times do
  char = gets.chars[0]
  if %w|M A R C H|.include?(char)
    hash[char] += 1
  end
end

m, a, r, c, h = hash["M"], hash["A"], hash["R"], hash["C"], hash["H"]
puts m * a * (r + c + h) + (m + a) * (r * c + r * h + c * h) + r * c * h


Compiler output:
main.c:1:1: warning: data definition has no type or storage class
    1 | hash = {}
      | ^~~~
main.c:1:1: error: type defaults to 'int' in declaration of 'hash' [-Wimplicit-int]
main.c:2:1: error: expected ',' or ';' before '%' token
    2 | %w|M A R C H|.each{ |c| hash[c] = 0 }
      | ^
main.c:4:5: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
    4 | gets.to_i.times do
      |     ^
Language: C++

#include<stdio.h>
#include<stdlib.h>
#include<iostream>
#include<string>
#include<algorithm>
#include<vector> 
#include<limits>
#include<numeric>
#include<type_traits>
#include<math.h>
using namespace std;

#define rep(i, n) for(int i = 0; i < (int)(n); i++)
#define repi(i,a,b) for(int i = (int)(a); i < (int)(b); i++)
#define in(x) cin >> x
#define out(str) cout << str << endl

template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return 1; } return 0; }

int N,cnt[5];
char check[5]={m,a,r,c,h};

int main(){
    cin>>N;
    string S[N];
    rep(i,N){
        cin>>S[i];
        rep(j,5){
            if(S[i][j]==check[j]){
                cnt[j]++;
            }
        }
    }
    int sum;
    rep(i,5){
        sum+=cnt[i];
    }
    if(sum<3){
        out(0);
    }
    else{
        int ans=1;
        rep(i,5){
            if(cnt[i])ans*=cnt[i];
        }
        out(ans);
    }
}


Compiler output:
a.cc:22:16: error: 'm' was not declared in this scope; did you mean 'tm'?
   22 | char check[5]={m,a,r,c,h};
      |                ^
      |                tm
a.cc:22:18: error: 'a' was not declared in this scope
   22 | char check[5]={m,a,r,c,h};
      |                  ^
a.cc:22:20: error: 'r' was not declared in this scope
   22 | char check[5]={m,a,r,c,h};
      |                    ^
a.cc:22:22: error: 'c' was not declared in this scope
   22 | char check[5]={m,a,r,c,h};
      |                      ^
a.cc:22:24: error: 'h' was not declared in this scope
   22 | char check[5]={m,a,r,c,h};
      |                        ^
Language: C

#include<stdio.h>

int main(){
int n,i,M=0,A=0,R=0,C=,H=0;
long long ans=0;
char na[100000][11];
scanf("%d",n);
for(i=0;i<n;i++)scanf("%s",na[i]);
for(i=0;i<n;i++){
switch(na[i][0]){
case 'M':M++;break;
case 'A':A++;break;
case 'R':R++;break;
case 'C':C++;break;
case 'H':H++;break;
}
}
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+R*C*H;
printf("%lld\n",ans);
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:4:23: error: expected expression before ',' token
    4 | int n,i,M=0,A=0,R=0,C=,H=0;
      |                       ^