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

int main() {
	long long n, a[5]={0,0,0,0,0}, r = 0;
	scanf("%ld", &n);
	for (int i = 0; i < n; i++) {
		char s[10];
		scanf("%s", s);
		if (s[0] == 'M'){
			a[0]++;
		}
		else if (s[0] == 'A') {
			a[1]++;
		}
		else if (s[0] == 'R') {
			a[2]++;
		}
		else if (s[0] == 'C') {
			a[3]++;
		}
		else if (s[0] == 'H') {
			a[4]++;
		}
	}
        int ans;
	for ( int z = 0; z < 3; z++;) {
        for ( int c = z+1; x < 4; x++){
        for ( int v = c+1; v < 5; v++){
        a[z]*a[c]*z[v] == ans;}}}}
        
	printf(ans);
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:3:9: error: 'scanf' was not declared in this scope
    3 |         scanf("%ld", &n);
      |         ^~~~~
a.cc:24:36: error: expected ')' before ';' token
   24 |         for ( int z = 0; z < 3; z++;) {
      |             ~                      ^
      |                                    )
a.cc:24:37: error: expected primary-expression before ')' token
   24 |         for ( int z = 0; z < 3; z++;) {
      |                                     ^
a.cc: At global scope:
a.cc:29:15: error: expected constructor, destructor, or type conversion before '(' token
   29 |         printf(ans);
      |               ^
a.cc:30:9: error: expected unqualified-id before 'return'
   30 |         return 0;
      |         ^~~~~~
a.cc:31:1: error: expected declaration before '}' token
   31 | }
      | ^
Language: C++

int main() {
	long long n, a[5]={0,0,0,0,0}, r = 0; q[5]={0,0,0,0,0}; p = 0;
	scanf("%ld", &n);
	for (int i = 0; i < n; i++) {
		char s[10];
		scanf("%s", s);
		if (s[0] == 'M'){
			a[0]++;q[0] = 1;
		}
		else if (s[0] == 'A') {
			a[1]++;q[1] = 1;
		}
		else if (s[0] == 'R') {
			a[2]++;q[2] = 1;
		}
		else if (s[0] == 'C') {
			a[3]++;q[3] = 1;
		}
		else if (s[0] == 'H') {
			a[4]++;q[4] = 1;
		}
	}
        int ans;
	for ( int z = 0; z < 3; z++;) {
        for ( int c = z+1; x < 4; x++){
        for ( int v = c+1; v < 5; v++){
        a[z]*a[c]*z[v] == ans;}}}}
        
	printf(ans);
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:2:47: error: 'q' was not declared in this scope
    2 |         long long n, a[5]={0,0,0,0,0}, r = 0; q[5]={0,0,0,0,0}; p = 0;
      |                                               ^
a.cc:2:65: error: 'p' was not declared in this scope
    2 |         long long n, a[5]={0,0,0,0,0}, r = 0; q[5]={0,0,0,0,0}; p = 0;
      |                                                                 ^
a.cc:3:9: error: 'scanf' was not declared in this scope
    3 |         scanf("%ld", &n);
      |         ^~~~~
a.cc:24:36: error: expected ')' before ';' token
   24 |         for ( int z = 0; z < 3; z++;) {
      |             ~                      ^
      |                                    )
a.cc:24:37: error: expected primary-expression before ')' token
   24 |         for ( int z = 0; z < 3; z++;) {
      |                                     ^
a.cc: At global scope:
a.cc:29:15: error: expected constructor, destructor, or type conversion before '(' token
   29 |         printf(ans);
      |               ^
a.cc:30:9: error: expected unqualified-id before 'return'
   30 |         return 0;
      |         ^~~~~~
a.cc:31:1: error: expected declaration before '}' token
   31 | }
      | ^
Language: C++

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

int main(){
    long n,a[5]={0,0,0,0,0},r=0;
    scanf("%ld", &n);
    for(int i=0;i<n;i++){
      char s[10];
      scanf("%s",s);
      if (s[0]=='M'){
      a[0]++;}
      else if (s[0]=='A'){
      a[1]++;}
      else if (s[0]=='R'){
      a[2]++;}
      else if (s[0]=='C'){
      a[3]++;}
      else if (s[0]=='H'){
      a[4]++;}    
      }

      for(int k=0;k<3;k++){
          for(int l=k+1;l<4;l++){
              for(int m=l+1;m<5;m++){
                 r+=a[k]*a[l]*a[m];
           }
}
}
printf("%ld",r);
return0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:30:1: error: 'return0' was not declared in this scope
   30 | return0;
      | ^~~~~~~
Language: C++

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

int main(){
    long long n,a[5]={0,0,0,0,0},r=0;
    scanf("%ld", &n);
    for(int i=0;i<n;i++){
      char s[10];
      scanf("%s",s);
      if (s[0]=='M'){
      a[0]++;}
      else if (s[0]=='A'){
      a[1]++;}
      elseif (s[0]=='R'){
      a[2]++;}
      else if (s[0]=='C'){
      a[3]++;}
      else if (s[0]=='H'){
      a[4]++;}    
      }

      for(int k=0;k<3;k++){
          for(int l=k+1;l<4;l++){
              for(int m=l+1;m<5;m++){
                 r+=a[k]*a[l]*a[m];
           }
}
}
printf("%ld",r);
return0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:7: error: 'elseif' was not declared in this scope
   14 |       elseif (s[0]=='R'){
      |       ^~~~~~
a.cc:16:7: error: 'else' without a previous 'if'
   16 |       else if (s[0]=='C'){
      |       ^~~~
a.cc:30:1: error: 'return0' was not declared in this scope
   30 | return0;
      | ^~~~~~~
Language: C++

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

int main(){
    int n,a[5]={0,0,0,0,0},r=0
    scanf("%ld", &n);
    for(int i=0;i<n;i++){
      char s[10];
      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 k=0;k<3;k++){
          for(int l=k+1;l<4;l++){
              for(int m=l+1;m<5;m++){
                 r+=a[k]*a[l]*a[m];
           }
}
}
printf("%ld",r);
return0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:5: error: expected ',' or ';' before 'scanf'
    6 |     scanf("%ld", &n);
      |     ^~~~~
a.cc:10:15: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   10 |       if (s[0]=="M"){
      |           ~~~~^~~~~
a.cc:12:15: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   12 |       if (s[0]=="A"){
      |           ~~~~^~~~~
a.cc:14:15: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   14 |       if (s[0]=="R"){
      |           ~~~~^~~~~
a.cc:16:15: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   16 |       if (s[0]=="C"){
      |           ~~~~^~~~~
a.cc:18:15: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   18 |       if (s[0]=="H"){
      |           ~~~~^~~~~
a.cc:30:1: error: 'return0' was not declared in this scope
   30 | return0;
      | ^~~~~~~
Language: C++

#include<iostream>
#include<string.h>
#include<studio.h>
#include<algorithm>
#include<math.h>
using namespace std;

int main(){
    int n,a[5]={0,0,0,0,0},r=0
    scanf("%ld", &n);
    for(int i=0;i<n;i++){
      char s[10];
      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 k=0;k<3;k++){
          for(int l=k+1;l<4;l++){
              for(int m=l+1;m<5;m++){
                 r+=a[k]*a[l]*a[m];
           }
}
}
printf("%ld",r);
return0;
}

Compiler output:
a.cc:3:9: fatal error: studio.h: No such file or directory
    3 | #include<studio.h>
      |         ^~~~~~~~~~
compilation terminated.
Language: C++

#include<iostream>
#include<string>
#include<studio>
#include<algorithm>
#include<math>
using namespace std;

int main(){
    int n,a[5]={0,0,0,0,0},r=0
    scanf("%ld", &n);
    for(int i=0;i<n;i++){
      char s[10];
      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 k=0;k<3;k++){
          for(int l=k+1;l<4;l++){
              for(int m=l+1;m<5;m++){
                 r+=a[k]*a[l]*a[m];
           }
}
}
printf("%ld",r);
return0;
}

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

#include <stdio.h>
#include <string.h>
 
main()
{
	long a[5] = {0,0,0,0,0};
	int N;
	scanf("%d", &N);
	int k;
	for(k = 1; k <= N; k++);
	{
		char s[11];
		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]++;
	}
	int O = 0;
	int s, t, r;
	for(s=0; s<=2; s++)
	 {for(t=s+1; t<=3; t++)
	   {for(r=t+1; r<=4; r++)
        {O += a[s]*a[t]*a[r];
	}}}
	printf("%ld", O);

Compiler output:
main.c:4:1: error: return type defaults to 'int' [-Wimplicit-int]
    4 | main()
      | ^~~~
main.c: In function 'main':
main.c:27:9: error: expected declaration or statement at end of input
   27 |         printf("%ld", O);
      |         ^~~~~~
Language: C

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

main()
{
	long a[5] = {0,0,0,0,0};
	int N;
	scanf("%d", &N);
	int k;
	for(k = 1; k <= N; k++);
	{
		char s[11];
		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]++;
	}
	int O = 0;
	int s, t, r;
	for(s=1; s<=3; s++)
	 {for(t=s+1; t<=4; t++)
	   {for(r=s+2; r<=5; r++)
        {O += a[s]*a[t]*a[r]
	}}}
	printf("%d", O);
}

Compiler output:
main.c:4:1: error: return type defaults to 'int' [-Wimplicit-int]
    4 | main()
      | ^~~~
main.c: In function 'main':
main.c:25:29: error: expected ';' before '}' token
   25 |         {O += a[s]*a[t]*a[r]
      |                             ^
      |                             ;
   26 |         }}}
      |         ~
Language: C

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

main()
{
	long a[5] = {0,0,0,0,0};
	int N;
	scanf("%d", &N);
	int k;
	for(k = 1; k <= N; k++);
	{
		char s[11];
		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]++;
	}
	int O = 0;
	int s, t, r;
	for(s=1; s<=3; s++)
	 {for(t=s+1; t<=4; t++)
	   {for(r=s+2; r<=5; R++)
		O += a[s]*a[t]*a[r]
	}}
	printf("%d", O);
}

Compiler output:
main.c:4:1: error: return type defaults to 'int' [-Wimplicit-int]
    4 | main()
      | ^~~~
main.c: In function 'main':
main.c:24:30: error: 'R' undeclared (first use in this function)
   24 |            {for(r=s+2; r<=5; R++)
      |                              ^
main.c:24:30: note: each undeclared identifier is reported only once for each function it appears in
main.c:25:36: error: expected ';' before '}' token
   25 |                 O += a[s]*a[t]*a[r]
      |                                    ^
      |                                    ;
   26 |         }}
      |         ~
Language: C

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

main()
{
	long a[5] = {0,0,0,0,0};
	int N;
	scanf("%d", &N);
	int k;
	for(k = 1; k <= N; k++);
	{
		char s[11];
		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]++;
	}
	int O = 0;
	int s, t, r;
	for(s=1; s<=3; s++)
	 {for(t=s+1; t<=4; t++)
	   {for(r=s+2; r<=5; r++)
		O += a[s]*a[t]*a[r]
	}
	printf("%d", O);
}

Compiler output:
main.c:4:1: error: return type defaults to 'int' [-Wimplicit-int]
    4 | main()
      | ^~~~
main.c: In function 'main':
main.c:25:36: error: expected ';' before '}' token
   25 |                 O += a[s]*a[t]*a[r]
      |                                    ^
      |                                    ;
   26 |         }
      |         ~                           
main.c:28:1: error: expected declaration or statement at end of input
   28 | }
      | ^
Language: C

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

main()
{
	long a[5] = {0,0,0,0,0};
	int N;
	scanf("%d", &N);
	int k;
	for(k = 1; k <= N; k++);
	{
		char s[11];
		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]++;
	}
	int O = 0;
	int s, t, r;
	for(s=1; s<=3; s++)
	 {for(t=s+1; t<=4; t++)
	   {for(r=s+2; r<=5; R++)
		O += a[s]*a[t]*a[r]
	}
	printf("%d", O);
}

Compiler output:
main.c:4:1: error: return type defaults to 'int' [-Wimplicit-int]
    4 | main()
      | ^~~~
main.c: In function 'main':
main.c:24:30: error: 'R' undeclared (first use in this function)
   24 |            {for(r=s+2; r<=5; R++)
      |                              ^
main.c:24:30: note: each undeclared identifier is reported only once for each function it appears in
main.c:25:36: error: expected ';' before '}' token
   25 |                 O += a[s]*a[t]*a[r]
      |                                    ^
      |                                    ;
   26 |         }
      |         ~                           
main.c:28:1: error: expected declaration or statement at end of input
   28 | }
      | ^
Language: C

/*
 AtCoder ABC 089
 */
 
#include <stdio.h>

int main(void){
	
	int m,a,r,c,h;
	int i,n;
	char name[10];
	unsigned long long num = 0;
	
	scanf("%d",&n);
	
	for(i=0,m=0,a=0,r=0,c=0,h=0; i<n; i++){
		scanf("%s",name);
		
		switch(name[0]){
			case 'M': m++ break;
			case 'A': a++ break;
			case 'R': r++ break;
			case 'C': c++ break;
			case 'H': h++ break;
		}
	}
	
	num += m*a*r;
	num += m*a*c;
	num += m*a*h;
	num += m*r*c;
	num += m*r*h;
	num += m*c*h;
	num += a*r*c;
	num += a*r*h;
	num += a*c*h;
	num += r*c*h;
	
	printf("%d",num);
	
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:20:38: error: expected ';' before 'break'
   20 |                         case 'M': m++ break;
      |                                      ^~~~~~
      |                                      ;
main.c:21:38: error: expected ';' before 'break'
   21 |                         case 'A': a++ break;
      |                                      ^~~~~~
      |                                      ;
main.c:22:38: error: expected ';' before 'break'
   22 |                         case 'R': r++ break;
      |                                      ^~~~~~
      |                                      ;
main.c:23:38: error: expected ';' before 'break'
   23 |                         case 'C': c++ break;
      |                                      ^~~~~~
      |                                      ;
main.c:24:38: error: expected ';' before 'break'
   24 |                         case 'H': h++ break;
      |                                      ^~~~~~
      |                                      ;
Language: C++

#include <iostream>
using namespace std;
#include <algorithm>

#define REP(i,a,b) for(int i=a;i<b;i++)
#define rep(i,n) REP(i,0,n)
#define int long long
char c[5] = {'M', 'A', 'R', 'C', 'H'};
int a[5];

int main(){
rep(i,5) a[i] = 0;

int n;
cin >> n;

rep(i,n){
	char tmp[15];
	cin >> tmp;
	rep(j,5){
		if(tmp[0] == c[j]){ a[j]++;}
	}
}

int out = 0;
rep(i,5){ REP(j,i+1,5){ REP(k,j+1,5){
	out += a[i] * a[j] * a[k];
}}}

cout << out <<endl;

return 0;
}

Compiler output:
cc1plus: error: '::main' must return 'int'
Language: C++

int main() {
	int N, i, M, A, R, C, H;
	unsigned long long ans;
	string Name;
	M = 0;A = 0;R = 0;C = 0;H = 0;
	cin >> N;
	for (i = 0;i < N;i++) {
		cin >> Name;
		if (Name[0] == 'M') { M++; }
		else if (Name[0] == 'A') { A++; }
		else if (Name[0] == 'R') { R++; }
		else if (Name[0] == 'C') { C++; }
		else if(Name[0] == 'H') { H++; }
		else {}
	}
	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:4:9: error: 'string' was not declared in this scope
    4 |         string Name;
      |         ^~~~~~
a.cc:6:9: error: 'cin' was not declared in this scope
    6 |         cin >> N;
      |         ^~~
a.cc:8:24: error: 'Name' was not declared in this scope
    8 |                 cin >> Name;
      |                        ^~~~
a.cc:17:9: error: 'cout' was not declared in this scope
   17 |         cout << ans << endl;
      |         ^~~~
a.cc:17:24: error: 'endl' was not declared in this scope
   17 |         cout << ans << endl;
      |                        ^~~~
Language: C++

#include <iostream>
using namespace std;

int main(void){
  int n;
  cin >> n;
  string name;
  int m=a=r=c=h=0;
  for (int i = 0; i < n; i++)
  {
    cin >> name;
    if (name[0] = 'M') m++;
    if (name[0] = 'A') a++;
    if (name[0] = 'R') r++;
    if (name[0] = 'C') c++;
    if (name[0] = 'H') h++;
  }
  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;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:9: error: 'a' was not declared in this scope
    8 |   int m=a=r=c=h=0;
      |         ^
a.cc:8:11: error: 'r' was not declared in this scope
    8 |   int m=a=r=c=h=0;
      |           ^
a.cc:8:13: error: 'c' was not declared in this scope
    8 |   int m=a=r=c=h=0;
      |             ^
a.cc:8:15: error: 'h' was not declared in this scope
    8 |   int m=a=r=c=h=0;
      |               ^
Language: C++

#include <iostream>
#include <cstdio>

int main()
{
	lomg lomg n;
	char s[10];
	//char top[]={'M','A','R','C','H'};
	long long  c[5]={0};
	long long ans=0;
	scanf("%lld",&n);

	for(int i=0;i<n;i++){
		scanf("%s",s);
		if(s[0]=='M'){c[0]++;}
        if(s[0]=='A'){c[1]++;}
        if(s[0]=='R'){c[2]++;}
        if(s[0]=='C'){c[3]++;}
        if(s[0]=='H'){c[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+=c[i]*c[j]*c[k];
			}
		}
	}
	printf("%lld\n",ans);

	return 0;
}

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

#include <iostream>
#include <algorithm>
#include <vector>
#include <queue>
#include <string.h>
#include <math.h>
typedef long long ll;
#define MAX(x, y)	(((x) > (y))? (x) : (y))
#define MIN(x, y)	(((x) < (y))? (x) : (y))
#define ABS(x)		(((x) < 0)? (-1*(x)) : (x))
#define REPI(x,y)	for (int i=(x);i<(y);i++)
#define REPJ(x,y)	for (int j=(x);j<(y);j++)
#define MEMCLR(X)	memset((X),0,sizeof((X)))

using namespace std;
typedef pair<int, int> Point;
typedef vector<vector<Point>> Graph;

int i,j,k,N;
string s;
int cnt[5];
ll ans;

int main() {
	cin >> N;
	
	REPI(0, N) {
		cin >> s;
		if (s[0] == 'M') cnt[0]++;
		if (s[0] == 'A') cnt[1]++;
		if (s[0] == 'R') cnt[2]++;
		if (s[0] == 'C') cnt[3]++;
		if (s[0] == 'H') cnt[4]++;
	}
	
	for (i=0;i<5;i++) for (j=i;j<5;j++) for (k=j;k<5;k++) 
	ans += (ll)cnt[i]*(ll)cnt[j]*(ll)*cnt[k];
	
	cout << ans;
	
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:37:42: error: invalid type argument of unary '*' (have 'int')
   37 |         ans += (ll)cnt[i]*(ll)cnt[j]*(ll)*cnt[k];
      |                                          ^~~~~~~
Language: C++

#include <iostream>
#include <string>

using namespace std;

int main(){
	int n;
	long long march[5] = {0};
	const char pat = "MARCH";

	cin >> n;
	for(int i=0; i<n ;i++){
		string s;
		cin >> s;
		for(int t=0; t<5; t++){
			if(pat[t] == s[0])
				march[t] += 1;
		}
	}

	long long ans = 0;

	for(int a=0; a<5; a++)
		for(int b=a+1; b<5; b++)
			for(int c=b+1; c<5; c++){
				ans += march[a] * march[b] * march[c];
			}

	cout << ans << endl;

	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:26: error: invalid conversion from 'const char*' to 'char' [-fpermissive]
    9 |         const char pat = "MARCH";
      |                          ^~~~~~~
      |                          |
      |                          const char*
a.cc:16:31: error: invalid types 'const char[int]' for array subscript
   16 |                         if(pat[t] == s[0])
      |                               ^
Language: C++

#include <algorithm>
#include <iostream>
#include <string>
#include <unordered_map>

auto main() -> int
{
  auto numHumans = 0;
  std::cin >> numHumans;
  std::string march("MARCH");
  std::unordered_map<char, std::vector<std::string>> humans;
  for (auto i = 0; i < numHumans; ++i) {
    std::string name;
    std::cin >> name;
    if (std::find(march.begin(), march.end(), name[0]) != march.end()) {
      humans[name[0]].push_back(name);
    }
  }
  long long int result = 0;
  for (int i = 0; i < march.size() - 2; ++i) {
    for (int j = i + 1; j < march.size() - 1; ++j) {
      for (int k = j + 1; k < march.size(); ++k) {
	result += humans[march[i]].size() * humans[march[j]].size() * humans[march[k]].size();
      }
    }
  }
  std::printf("%lld\n", result);
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:33: error: 'vector' is not a member of 'std'
   11 |   std::unordered_map<char, std::vector<std::string>> humans;
      |                                 ^~~~~~
a.cc:5:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
    4 | #include <unordered_map>
  +++ |+#include <vector>
    5 | 
a.cc:11:45: error: template argument 2 is invalid
   11 |   std::unordered_map<char, std::vector<std::string>> humans;
      |                                             ^~~~~~
a.cc:11:45: error: template argument 5 is invalid
a.cc:11:51: error: expected unqualified-id before '>' token
   11 |   std::unordered_map<char, std::vector<std::string>> humans;
      |                                                   ^~
a.cc:16:7: error: 'humans' was not declared in this scope; did you mean 'numHumans'?
   16 |       humans[name[0]].push_back(name);
      |       ^~~~~~
      |       numHumans
a.cc:23:19: error: 'humans' was not declared in this scope; did you mean 'numHumans'?
   23 |         result += humans[march[i]].size() * humans[march[j]].size() * humans[march[k]].size();
      |                   ^~~~~~
      |                   numHumans
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:20: warning: extra tokens at end of #include directive
    1 | #include <cstdio > #include <iostream > using namespace std; typedef long long ll;
      |                    ^
a.cc:1:10: fatal error: cstdio : No such file or directory
    1 | #include <cstdio > #include <iostream > using namespace std; typedef long long ll;
      |          ^~~~~~~~~
compilation terminated.
Language: C++

import itertools
def main():
    n = int(input())
    
    m = 0
    a = 0
    r = 0
    c = 0
    h = 0
    for _ in range(n):
        s = input()
        if(s[0] == "M"):
            m += 1
        elif(s[0] == "A"):
            a += 1
        elif(s[0] == "R"):
            r += 1
        elif(s[0] == "C"):
            c += 1
        elif(s[0] == "H"):
            h += 1

    T = [m, a, r, c, h]

    ans = 0
    for i in range(3):
        for j in range(i + 1, 4):
            for k in range(j + 1, 5):
                ans += T[i] * T[j] * T[k]
    print(ans)

if __name__ == "__main__":
    main()

Compiler output:
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<iostream>
#include<cstdio>

int main(){
  string s="MARCH";
  int c[5] = {0};
  int N;
  cin>>N;
  for(int i=0; i<N; i++){
    string t;
    cin>>t;
    for(int i=0; i<5; i++){
      if(t[0] == s[i])
        c[i]++;
    }
  }
  int ans = 0;
  for(int i=0; i<5; i++){
    for(int j=i+1; j<5; j++){
      for(int k=j+1; k<5; j++){
        ans += c[i]*c[k]*c[j];
      }
    }
  }
  cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:3: error: 'string' was not declared in this scope
    5 |   string s="MARCH";
      |   ^~~~~~
a.cc:5:3: note: suggested alternatives:
In file included from /usr/include/c++/14/iosfwd:41,
                 from /usr/include/c++/14/ios:40,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stringfwd.h:77:33: note:   'std::string'
   77 |   typedef basic_string<char>    string;
      |                                 ^~~~~~
In file included from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44:
/usr/include/c++/14/string:76:11: note:   'std::pmr::string'
   76 |     using string    = basic_string<char>;
      |           ^~~~~~
a.cc:8:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    8 |   cin>>N;
      |   ^~~
      |   std::cin
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:10:11: error: expected ';' before 't'
   10 |     string t;
      |           ^~
      |           ;
a.cc:11:10: error: 't' was not declared in this scope
   11 |     cin>>t;
      |          ^
a.cc:13:18: error: 's' was not declared in this scope
   13 |       if(t[0] == s[i])
      |                  ^
a.cc:25:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   25 |   cout << ans << endl;
      |   ^~~~
      |   std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:25:18: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   25 |   cout << ans << endl;
      |                  ^~~~
      |                  std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

#include<iostream>
#include<stdio>

int main(){
  string s="MARCH";
  int c[5] = {0};
  int N;
  cin>>N;
  for(int i=0; i<N; i++){
    string t;
    cin>>t;
    for(int i=0; i<5; i++){
      if(t[0] == s[i])
        c[i]++;
    }
  }
  int ans = 0;
  for(int i=0; i<5; i++){
    for(int j=i+1; j<5; j++){
      for(int k=j+1; k<5; j++){
        ans += c[i]*c[k]*c[j];
      }
    }
  }
  cout << ans << endl;
}

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

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

int main() {
	int n, m = 0, i, j;
	long long int ans;
	scanf("%d", &n);
	char s[n + 1];
	for (i = 0; i < n; i++) {
		scanf("%s", &s[i]);
	}
	s[n] = '\0'
	long long int a[5]; // MARCHの数
	for (i = 0; i < 5; i++) {
		a[i] = 0;
	}
	for (i = 0; i < n; i++) {
		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]++;
	}
	ans = a[0]*a[1]*a[2] + a[0]*a[1]*a[3] + a[0]*a[1]*a[4] + a[0]*a[2]*a[3] + a[0]*a[2]*a[4] + a[0]*a[3]*a[4] + a[1]*a[2]*a[3] + a[1]*a[2]*a[4] + a[1]*a[3]*a[4] + a[2]*a[3]*a[4];
	printf("%lld\n", ans);
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:15:20: error: expected ';' before 'long'
   15 |         s[n] = '\0'
      |                    ^
      |                    ;
   16 |         long long int a[5]; // MARCHの数
      |         ~~~~        
main.c:18:17: error: 'a' undeclared (first use in this function)
   18 |                 a[i] = 0;
      |                 ^
main.c:18:17: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>
int main(){
int n;
scanf("%d¥n",&n);
int m=0;
int r=0;
int c=0;
int a=0;
int h=0;
for(int i = 0;i<n;i++){
char str[64];
scanf("%s¥n",&str);
if(str[0] == "M"){m++;}
if(str[0] == "C"){c++;}
if(str[0] == "A"){a++;}
if(str[0] == "R"){r++;}
if(str[0] == "H"){h++;}
}
unsigned long ans;
ans = (m+c+a+r+h)*(m+c+a+r+h)*(m+c+a+r+h);
ans -= (m+c+a+r+h)*3*a*a-2*a*a*a;
ans -= (m+c+a+r+h)*3*m*m-2*m*m*m;
ans -= (m+c+a+r+h)*3*h*h-2*h*h*h;
ans -= (m+c+a+r+h)*3*r*r-2*r*r*r
ans -= (m+c+a+r+h)*3*c*c-2*c*c*c;
printf("%lu",ans);
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:13:11: warning: comparison between pointer and integer
   13 | if(str[0] == "M"){m++;}
      |           ^~
main.c:14:11: warning: comparison between pointer and integer
   14 | if(str[0] == "C"){c++;}
      |           ^~
main.c:15:11: warning: comparison between pointer and integer
   15 | if(str[0] == "A"){a++;}
      |           ^~
main.c:16:11: warning: comparison between pointer and integer
   16 | if(str[0] == "R"){r++;}
      |           ^~
main.c:17:11: warning: comparison between pointer and integer
   17 | if(str[0] == "H"){h++;}
      |           ^~
main.c:24:33: error: expected ';' before 'ans'
   24 | ans -= (m+c+a+r+h)*3*r*r-2*r*r*r
      |                                 ^
      |                                 ;
   25 | ans -= (m+c+a+r+h)*3*c*c-2*c*c*c;
      | ~~~
Language: C

#include <stdio.h>
int main(){
int n;
scanf("%d¥n",n);
int m=0;
int r=0;
int c=0;
int a=0;
int h=0;
for(int i = 0;i<n;i++){
char str[64];
scanf("%s¥n",&str);
if(str[0] == "M"){m++;}
if(str[0] == "C"){c++;}
if(str[0] == "A"){a++;}
if(str[0] == "R"){r++;}
if(str[0] == "H"){h++;}
}
unsigned long ans;
ans = (m+c+a+r+h)*(m+c+a+r+h)*(m+c+a+r+h);
ans -= (m+c+a+r+h)*3*a*a-2*a*a;
ans -= (m+c+a+r+h)*3*m*m-2*m*m;
ans -= (m+c+a+r+h)*3*h*h-2*h*h;
ans -= (m+c+a+r+h)*3*r*r-2*r*r;
ans -= (m+c+a+r+h)*3*c*c-2*c*c;
printf();
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:13:11: warning: comparison between pointer and integer
   13 | if(str[0] == "M"){m++;}
      |           ^~
main.c:14:11: warning: comparison between pointer and integer
   14 | if(str[0] == "C"){c++;}
      |           ^~
main.c:15:11: warning: comparison between pointer and integer
   15 | if(str[0] == "A"){a++;}
      |           ^~
main.c:16:11: warning: comparison between pointer and integer
   16 | if(str[0] == "R"){r++;}
      |           ^~
main.c:17:11: warning: comparison between pointer and integer
   17 | if(str[0] == "H"){h++;}
      |           ^~
main.c:26:1: error: too few arguments to function 'printf'
   26 | printf();
      | ^~~~~~
In file included from main.c:1:
/usr/include/stdio.h:363:12: note: declared here
  363 | extern int printf (const char *__restrict __format, ...);
      |            ^~~~~~
Language: C++

#include <stdio.h>
using namespace std;
char s[1000];
int main()
{
    int m,a,r,c,h,i,n,sum=0;
    scanf("%d",&n);
  for(i=1; i<=n; i++)
  {
    scanf("%s", array);
    if(array[0]=='M')m++;
    if(array[0]=='A')a++;
    if(array[0]=='R')r++;
    if(array[0]=='C')c++;
    if(array[0]=='H')h++;
  }
  
  sum=m*a*r+m*a*c+m*a*h+m*r*c+m*r*h+m*c*h+a*r*c+a*c*h+r*c*h+a*r*h;
	printf("%d",sum);
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:17: error: 'array' was not declared in this scope
   10 |     scanf("%s", array);
      |                 ^~~~~
a.cc:2:1: note: 'std::array' is defined in header '<array>'; this is probably fixable by adding '#include <array>'
    1 | #include <stdio.h>
  +++ |+#include <array>
    2 | using namespace std;
Language: C++

#include <bits/stdc++.h>

using namespace std;
unsigned long long  n,k,a,wynik,roz;
int tab[100];
string b;
int main() {
scanf("%llu",&n);

for(int i=0;n>i;i++)
{
    cin>>b;
    tab[b[0]]++;
}
if(tab[77]>0)
    wynik++;
    if(tab[65]>0)
    wynik++;
if(tab[82]>0)
    wynik++;
if(tab[67]>0)
    wynik++;
if(tab[72]>0)
    wynik++;
roz=wynik*(wynik-1)*(wynik-2)/6;
if(roz<0)
    roz=0;


if((tab[77]>1 and wynik>1)
roz+=(tab[77]-1)*(wynik-1);
if((tab[65]>1 and wynik>1)
roz+=(tab[65]-1)*(wynik-1);
if((tab[82]>1 and wynik>1)
roz+=(tab[82]-1)*(wynik-1);
if((tab[67]>1 and wynik>1)
roz+=(tab[67]-1)*(wynik-1);
if((tab[72]>1 and wynik>1)
roz+=(tab[72]-1)*(wynik-1);
cout<<roz;
return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:30:27: error: expected ';' before 'roz'
   30 | if((tab[77]>1 and wynik>1)
      |                           ^
      |                           ;
   31 | roz+=(tab[77]-1)*(wynik-1);
      | ~~~                        
a.cc:32:1: error: expected primary-expression before 'if'
   32 | if((tab[65]>1 and wynik>1)
      | ^~
a.cc:31:28: error: expected ')' before 'if'
   31 | roz+=(tab[77]-1)*(wynik-1);
      |                            ^
      |                            )
   32 | if((tab[65]>1 and wynik>1)
      | ~~                          
a.cc:30:3: note: to match this '('
   30 | if((tab[77]>1 and wynik>1)
      |   ^
a.cc:34:27: error: expected ';' before 'roz'
   34 | if((tab[82]>1 and wynik>1)
      |                           ^
      |                           ;
   35 | roz+=(tab[82]-1)*(wynik-1);
      | ~~~                        
a.cc:36:1: error: expected primary-expression before 'if'
   36 | if((tab[67]>1 and wynik>1)
      | ^~
a.cc:35:28: error: expected ')' before 'if'
   35 | roz+=(tab[82]-1)*(wynik-1);
      |                            ^
      |                            )
   36 | if((tab[67]>1 and wynik>1)
      | ~~                          
a.cc:34:3: note: to match this '('
   34 | if((tab[82]>1 and wynik>1)
      |   ^
a.cc:38:27: error: expected ';' before 'roz'
   38 | if((tab[72]>1 and wynik>1)
      |                           ^
      |                           ;
   39 | roz+=(tab[72]-1)*(wynik-1);
      | ~~~                        
a.cc:40:10: error: expected ')' before ';' token
   40 | cout<<roz;
      |          ^
      |          )
a.cc:38:3: note: to match this '('
   38 | if((tab[72]>1 and wynik>1)
      |   ^
Language: C++

#include"iostream"
2.#include"string"
3.using namespace std;
4. 
5.int main()
6.{
7.	unsigned long long n,k,m,a,r,c,h;
8.	m=a=r=c=h= 0;
9.	cin >> n;
10.	
11.	do {
12.		string x,ch;
13.		cin >> x;
14.		ch = x[0];
15.		if (ch == "M")m = m + 1;
16.		else if (ch == "A") a = a + 1;
17.		else if (ch == "R")r = r + 1;
18.		else if (ch == "C")c = c + 1;
19.		else if (ch == "H")h = h + 1;
20.		
21.		n=n-1;
22. 
23.	}while (n >= 1);
24. 
25.	unsigned long long l = 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;
26.	cout <<l;
27.}


Compiler output:
a.cc:2:3: error: stray '#' in program
    2 | 2.#include"string"
      |   ^
a.cc:2:1: error: expected unqualified-id before numeric constant
    2 | 2.#include"string"
      | ^~
a.cc:4:1: error: expected unqualified-id before numeric constant
    4 | 4.
      | ^~
Language: C++

#include<iostream>
#include<string>
#include<algorithm>

using namespace std;

string s[100000];
int counts[5];

int main()
{
	for (size_t i = 0; i < 5; i++)
	{
		counts[i] = 0;
	}

	int N;
	cin >> N;

	string march = "MARCH";
	for (size_t i = 0; i < N; i++)
	{
		cin >> s[i];

        auto p = march.find(s[i][0]);
		if (p==string::npos)
          countinue;
      
		counts[p]++;
	}

	long long ans = 0;
	for (size_t i = 0; i < 5; i++)
	{
		for (size_t j = i + 1; j < 5; j++)
		{
			for (size_t k = j + 1; k < 5; k++)
			{
				ans += counts[i] * counts[j] * counts[k];
			}
		}
	}

	cout << ans << endl;

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:27:11: error: 'countinue' was not declared in this scope
   27 |           countinue;
      |           ^~~~~~~~~
Language: C++

#include <iostream>
using namespace std;
 
int main(){
    long long int N,set;
    char head;
    int node[5]={0,0,0,0,0};
    string S;
 
    cin>>N;
    for(int i=0;i<N;i++){
        cin>>S;
        head=S[0];
        if(head=='M') node[0]=1;
        if(head=='A') node[1]+=1;
        if(head=='R') node[2]+=1;
        if(head=='C') node[3]+=1;
        if(head=='H') node[4]+=1;       
    }
 
    set=0;
    for(int i=0;i<5;i++){
        for(int j=0;j<i;j++){
            for(int k=0;k<j;k++){
                set+=node[i]*node[j]*node[k];
            }
        }
    }
 
 
    cout<< set <<endl;
 
    return 0;
}
#include <iostream>
using namespace std;

int main(){
    long long int N,set;
    char head;
    int node[5]={0,0,0,0,0};
    string S;

    cin>>N;
    for(int i=0;i<N;i++){
        cin>>S;
        head=S[0];
        if(head=='M') node[0]+=1;
        if(head=='A') node[1]+=1;
        if(head=='R') node[2]+=1;
        if(head=='C') node[3]+=1;
        if(head=='H') node[4]+=1;       
    }

    set=0;
    for(int i=0;i<5;i++){
        for(int j=0;j<i;j++){
            for(int k=0;k<j;k++){
                set+=node[i]*node[j]*node[k];
            }
        }
    }

    cout<< set <<endl;
    return 0;
}
提出情報

Compiler output:
a.cc:38:5: error: redefinition of 'int main()'
   38 | int main(){
      |     ^~~~
a.cc:4:5: note: 'int main()' previously defined here
    4 | int main(){
      |     ^~~~
a.cc:67:1: error: '\U000063d0\U000051fa\U000060c5\U00005831' does not name a type
   67 | 提出情報
      | ^~~~~~~~
Language: C++

#include <iostream>
#include <string>
using namespace std;

int main() {
  int N;
  cin >> N;
  #define size N
  string s[size];
  for (int i = 0; i < N; i++) {
    cin >> s[i];
  }
  int march[5];
  for (int i = 0; i < 5; i++) {
    march[i] = 0;
  }
  for (int i = 0; i < N; i++) {
    switch(s[i][0]) {
      case 'M': march[0]++; break;
      case 'A': march[1]++; break;
      case 'R': march[2]++; break;
      case 'C': march[3]++; break;
      case 'H': march[4]++; break;
      default: break;
    }
  }
  int ans = 0;
  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};
  for (int i = 0; i < 10) {
    ans += march[p[i]] * march[q[i]] * march[r[i]];
  }
  cout << ans << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:31:25: error: expected ';' before ')' token
   31 |   for (int i = 0; i < 10) {
      |                         ^
      |                         ;
Language: C++

#include <stdio.h>

enum 

int main()
{
	int n;
	long long int mozi[5] = {0};
	long long int ans = 1;
	long long int zenbu = 0;
	int i, j, k;
	char s[11];

	scanf("%d", &n);
	for (i= 0; i < n; i++) {
		scanf("%s", s);

		switch (s[0]) {
			case 'M' :
				mozi[0]++;
				break;
			case 'A' :
				mozi[1]++;
				break;
			case 'R' :
				mozi[2]++;
				break;
			case 'C' :
				mozi[3]++;
				break;
			case 'H' :
				mozi[4]++;
				break;
		}

	}

	for (i = 0; i < 3; i++) {
		for (j = i+1; j < 4; j++) {
			for (k = j+1; k < 5; k++) {
				ans = mozi[i] * mozi[j] * mozi[k];
				zenbu += ans;
			}
		}
	}

	printf("%lld", zenbu);
	return 0;
}



Compiler output:
a.cc:5:1: error: expected identifier before 'int'
    5 | int main()
      | ^~~
a.cc:3:1: error: two or more data types in declaration of 'main'
    3 | enum
      | ^~~~
Language: C++

#include <iostream>
#include <string>
using namespace std;

int main() {
  int N;
  cin >> N;
  #define size N
  string s[size];
  for (int i = 0; i < N; i++) {
    cin >> s[i];
  }
  int march[5];
  for (int i = 0; i < 5; i++) {
    march[i] = 0;
  }
  for (int i = 0; i < N; i++) {
    switch(s[i][0]) {
      case 'M': march[0]++; break;
      case 'A': march[1]++; break;
      case 'R': march[2]++; break;
      case 'C': march[3]++; break;
      case 'H': march[4]++; break;
      default: break;
    }
  }
  int ans = 0;
  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}
  for (int i = 0; i < 10) {
    ans += march[p[i]] * march[q[i]] * march[r[i]];
  }
  cout << ans << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:29:3: error: expected ',' or ';' before 'int'
   29 |   int q[10] = {1, 1, 1, 2, 2, 3, 2, 2, 3, 3}
      |   ^~~
a.cc:31:3: error: expected ',' or ';' before 'for'
   31 |   for (int i = 0; i < 10) {
      |   ^~~
a.cc:31:19: error: 'i' was not declared in this scope
   31 |   for (int i = 0; i < 10) {
      |                   ^
Language: C++

#include<iostream>
using namespace std;

int main(){
    long long int N;
    string S[110000];
    char c[110000];
    int a = 0;
    for(int i = 0; i < N; i++){
        cin >> S[i];
        c[i] = S[i][1];
    }
    for(int i = 0; i < N; i++){
        if(strcmp(c[i],"M")==0 || strcmp(c[i],"A")==0 || strcmp(c[i],"R")==0 || strcmp(c[i],"C")==0 || strcmp(c[i],"H")==0){
            for(int j = i+1; j < N; j++){
                if(strcmp(c[j],"M")==0 || strcmp(c[j],"A")==0 || strcmp(c[j],"R")==0 || strcmp(c[j],"C")==0 || strcmp(c[j],"H")==0 && strcmp(c[i],c[j])==0){
                    for(int k = j+1; k < N; k++){
                        if(strcmp(c[k],"M")==0 || strcmp(c[k],"A")==0 || strcmp(c[k],"R")==0 || strcmp(c[k],"H")==0 || strcmp(c[k],"C")==0 && strcmp(c[k],c[i])!=0 && strcmp(c[k],c[j])!=0){
                            a += 1;
                        }
                    }
                }
            }
        }
    }
    cout << a << endl;
    
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:12: error: 'strcmp' was not declared in this scope
   14 |         if(strcmp(c[i],"M")==0 || strcmp(c[i],"A")==0 || strcmp(c[i],"R")==0 || strcmp(c[i],"C")==0 || strcmp(c[i],"H")==0){
      |            ^~~~~~
a.cc:2:1: note: 'strcmp' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    1 | #include<iostream>
  +++ |+#include <cstring>
    2 | using namespace std;
Language: C++

#include <iostream>
using namespace std;

int main(){
    int N,set;
    char head;
    int node[5]=[0,0,0,0,0];
    string S;

    cin>>N;
    for(int i=0;i<N;i++){
        cin>>S;
        head=S[0];
        if(head=='M') node[0]=1;
        if(head=='A') node[1]+=1;
        if(head=='R') node[2]+=1;
        if(head=='C') node[3]+=1;
        if(head=='H') node[4]+=1;       
    }

    set=0;
    for(int i=0;i<5;i++){
        for(int j=0;j<i;j++){
            for(int k=0;j>k;k++){
                set+=node[i]*node[j]*node[k];
            }
        }
    }


    cout<< set <<endl;

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:18: error: expected identifier before numeric constant
    7 |     int node[5]=[0,0,0,0,0];
      |                  ^
a.cc:7:19: error: expected ']' before ',' token
    7 |     int node[5]=[0,0,0,0,0];
      |                   ^
      |                   ]
a.cc: In lambda function:
a.cc:7:19: error: expected '{' before ',' token
a.cc: In function 'int main()':
a.cc:7:17: error: array must be initialized with a brace-enclosed initializer
    7 |     int node[5]=[0,0,0,0,0];
      |                 ^~
a.cc:7:20: error: expected unqualified-id before numeric constant
    7 |     int node[5]=[0,0,0,0,0];
      |                    ^
Language: C++

#include <iostream>
using namespace std;

int main(){
    int N,set;
    char head;
    int node[5]=0;
    string S;

    cin>>N;
    for(int i=0;i<N;i++){
        cin>>S;
        head=S[0];
        if(head=='M') node[0]=1;
        if(head=='A') node[1]+=1;
        if(head=='R') node[2]+=1;
        if(head=='C') node[3]+=1;
        if(head=='H') node[4]+=1;       
    }

    set=0;
    for(int i=0;i<5;i++){
        for(int j=0;j<i;j++){
            for(int k=0;j>k;k++){
                set+=node[i]*node[j]*node[k];
            }
        }
    }


    cout<< set <<endl;

    return 0;
}

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

#include <iostream>
using namespace std;

int main(){
    int N,set;
    char head;
    int node[5]=0;
    string S;

    cin>>N;
    for(int i=0;i<N;i++){
        cin>>S;
        head=S[0];
        if(head=='M') node[0]=1;
        if(head=='A') node[1]+=1;
        if(head=='R') node[2]+=1;
        if(head=='C') node[3]+=1;
        if(head=='H') node[4]+=1;       
    }

    set=0;
    for(int i=0;i<5,i++){
        for(int j=0;j<i,j++){
            for(int k=0;j>k,k++){
                set+=node[i]*node[j]*node[k];
            }
        }
    }


    cout<< set <<endl;

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:17: error: array must be initialized with a brace-enclosed initializer
    7 |     int node[5]=0;
      |                 ^
a.cc:22:24: error: expected ';' before ')' token
   22 |     for(int i=0;i<5,i++){
      |                        ^
      |                        ;
a.cc:23:28: error: expected ';' before ')' token
   23 |         for(int j=0;j<i,j++){
      |                            ^
      |                            ;
a.cc:24:32: error: expected ';' before ')' token
   24 |             for(int k=0;j>k,k++){
      |                                ^
      |                                ;
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main()
{
  int x, y, z, c;
  int d[5];
  for(int i=0;i<5;i++){
    d[i]=0;
  }
	char a[100001][100];
	char b[5][2]={"M",
	               "A",
	               "R",
	               "C",
	               "H"};
	cin >> x;
	for (y = 0; y < x; y++) {
		cin >> a[y];
		for(z=0;z<5;z++){
		c = strcmp(a[y][0], b[z][0]);
		if (c == 0) {
			d[z]=d[z]+1;
		}
	}
	}
	cout << d[0]*d[1]*d[2]*d[3]*d[4] << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:34: error: invalid conversion from 'char' to 'const char*' [-fpermissive]
   20 |                 c = strcmp(a[y][0], b[z][0]);
      |                            ~~~~~~^
      |                                  |
      |                                  char
In file included from /usr/include/c++/14/cstring:43,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:121,
                 from a.cc:1:
/usr/include/string.h:156:32: note:   initializing argument 1 of 'int strcmp(const char*, const char*)'
  156 | extern int strcmp (const char *__s1, const char *__s2)
      |                    ~~~~~~~~~~~~^~~~
a.cc:20:43: error: invalid conversion from 'char' to 'const char*' [-fpermissive]
   20 |                 c = strcmp(a[y][0], b[z][0]);
      |                                     ~~~~~~^
      |                                           |
      |                                           char
/usr/include/string.h:156:50: note:   initializing argument 2 of 'int strcmp(const char*, const char*)'
  156 | extern int strcmp (const char *__s1, const char *__s2)
      |                                      ~~~~~~~~~~~~^~~~
Language: C++

#include<iostream>
#include<vector>
#include<algorithm>
#include<string>
#include<cmath>
#include<map>
using namespace std;

#define rep(i,n) for(int i=0;i<(n);i++)
#define rep2(i,j,n) for(int i=(j)+1;i<(n);i++)

int m = 0;
int y;

int k1(string a) {
	if (a == "M") {
		m++;
		return 1;
	}
	else if (a == "A") {
		m++;
		return 2;
	}
	else if (a == "R") {
		m++;
		return 3;
	}
	else if (a == "C") {
		m++;
		return 4;
	}
	else if (a == "H") {
		m++;
		return 5;
	}
	else {
		return 0;
	}
}

int main() {
	long int n;
	cin >> n;
	vector<string> s(n);
	rep(i, n) {
		cin >> s[i];
	}
	vector<int> x(n);
	rep(i, n) {
		string a = s[i];
		a = a[0];
		x[i] = k1(a);
	}
	if (m < 3) {
		cout << 0 << endl;
		return 0;
	}
	sort(x.begin(), x.end());
	int ans = 0;
	rep(i, n) {
		if (x[i] == 0) {
			continue;
		}
		rep2(j, i, n) {
			if (x[j] == 0 || x[j] == x[i]) {
				continue;
			}
			rep(k, j, n) {
				if (x[k] == 0) {
					continue;
				}
				else if (x[k] == x[i] || x[k] == x[j]) {
					continue;
				}
				ans++;
			}
		}
	}
	cout << ans / 2 << endl;
	return 0;
}

Compiler output:
a.cc:68:36: error: macro "rep" passed 3 arguments, but takes just 2
   68 |                         rep(k, j, n) {
      |                                    ^
a.cc:9:9: note: macro "rep" defined here
    9 | #define rep(i,n) for(int i=0;i<(n);i++)
      |         ^~~
a.cc: In function 'int main()':
a.cc:68:25: error: 'rep' was not declared in this scope
   68 |                         rep(k, j, n) {
      |                         ^~~