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

#include<iostream>
using namespace std;
int main(){
	int a[5],n;
	char f;
	cin>>n;
	for(int i=0;i<n;i++){
		cin>>f;
		if(f=="P") a[1]==1;
		if(f=="W") a[2]==1;
		if(f=="G") a[3]==1;
		if(f=="Y") a[4]==1;
	}
	if((a[1]+a[2]+a[3]+a[4])==4) cout<<"Four";
	else cout<<"Three";
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:21: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    9 |                 if(f=="P") a[1]==1;
      |                    ~^~~~~
a.cc:10:21: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   10 |                 if(f=="W") a[2]==1;
      |                    ~^~~~~
a.cc:11:21: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   11 |                 if(f=="G") a[3]==1;
      |                    ~^~~~~
a.cc:12:21: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   12 |                 if(f=="Y") a[4]==1;
      |                    ~^~~~~
Language: C

#include <stdio.h>
int main(void){
      char n[100];
      int p=3;
      for(int i=0;i=99;i++){
            scanf("%s",n[i]);
            if(n[i]=="Y"){
                  p++;
                  break;
           }
      printf("%d",p);
}

Compiler output:
main.c: In function 'main':
main.c:7:20: warning: comparison between pointer and integer
    7 |             if(n[i]=="Y"){
      |                    ^~
main.c:12:1: error: expected declaration or statement at end of input
   12 | }
      | ^
Language: C++

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

int main(){
    int a;
    cin>> a;
    char c;
    scanf(" %c", &c);
    for(int n=0; n<a; n++)
    {
        if(c[n]=="Y")
        {
            cout<<"Four"<<"\n";
            return 0;
        }

    }
    cout<< "Three" <<"\n";
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:13: error: invalid types 'char[int]' for array subscript
   12 |         if(c[n]=="Y")
      |             ^
Language: C++

#include <stdio.h>
int main(void){
      char n[100];
      int p=3;
      for(int i=0;i=99;i++){
            scanf("%s",n[i]);
            if(n[i]==Y){
                  p++;
                  break;
           }
      printf("%d",p);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:22: error: 'Y' was not declared in this scope
    7 |             if(n[i]==Y){
      |                      ^
a.cc:12:2: error: expected '}' at end of input
   12 | }
      |  ^
a.cc:2:15: note: to match this '{'
    2 | int main(void){
      |               ^
Language: C++

#include <stdio.h>
int main(void){
      char n[100];
      int p=3;
      for(i=0;i=99;i++){
            scanf("%s",n[i]);
            if(n[i]==Y){
                  p++;
                  break;
           }
      printf("%d",p)
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:11: error: 'i' was not declared in this scope
    5 |       for(i=0;i=99;i++){
      |           ^
a.cc:7:22: error: 'Y' was not declared in this scope
    7 |             if(n[i]==Y){
      |                      ^
a.cc:11:21: error: expected ';' before '}' token
   11 |       printf("%d",p)
      |                     ^
      |                     ;
   12 | }
      | ~                    
a.cc:12:2: error: expected '}' at end of input
   12 | }
      |  ^
a.cc:2:15: note: to match this '{'
    2 | int main(void){
      |               ^
Language: C++

#include <cstdio>
#include <cstring>
#include <cstdlib>
#include <iostream>
#include <string>
#include <algorithm>
#include <cmath>
using namespace std;
typedef long long LL;
const int MaxN = 1e5 + 5;

char s[1000];
int main () {
	int n;
	scanf("%d", &n);
	getchar();
	gets(s);
	int flag = 0;
	for(int i = 0; i < strlen(s); i++) 
		if(s[i] == 'Y') flag = 1;
	if(flag) printf("Four\n");
	else printf("Three\n");
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
   17 |         gets(s);
      |         ^~~~
      |         getw
Language: C++

#include <cstdio>
#include <cstring>
#include <cstdlib>
#include <iostream>
#include <algorithm>
#include <cmath>
using namespace std;
typedef long long LL;
const int MaxN = 1e5 + 5;

char s[1000];
int main () {
	int n;
	scanf("%d", &n);
	getchar();
	gets(s);
	int flag = 0;
	for(int i = 0; i < strlen(s); i++) 
		if(s[i] == 'Y') flag = 1;
	if(flag) printf("Four\n");
	else printf("Three\n");
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
   16 |         gets(s);
      |         ^~~~
      |         getw
Language: C++

#include<iostream>
using namespace std;
int n;
char a[101];
int cnt[4];
int main()
{
	cin >> n;
	for (int i = 0; i < n; i++) {
		cin >> a[i];
		if (a[i] == 'P')cnt[0]++;
		if (a[i] == 'W')cnt[1]++;
		if (a[i] == 'G')cnt[2]++;
		if (a[i] == 'Y')cnt[3]++;
	}
	int total = 0;
	for (int i = 0; i < 4; i++)
		if (cnt[i])total++;
	cout << total;
	return 0;

Compiler output:
a.cc: In function 'int main()':
a.cc:20:18: error: expected '}' at end of input
   20 |         return 0;
      |                  ^
a.cc:7:1: note: to match this '{'
    7 | {
      | ^
Language: Java

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.Set;
import java.util.StringTokenizer;

class Main{

	static class FastReader {

		BufferedReader br;
		StringTokenizer st;

		public FastReader() {
			br = new BufferedReader(new InputStreamReader(System.in));
		}

		String next() {
			while (st == null || !st.hasMoreElements()) {
				try {
					st = new StringTokenizer(br.readLine());
				} catch (IOException e) {
					e.printStackTrace();
				}
			}
			return st.nextToken();
		}

		int nextInt() {
			return Integer.parseInt(next());
		}

		long nextLong() {
			return Long.parseLong(next());
		}

		double nextDouble() {
			return Double.parseDouble(next());
		}

		String nextLine() {
			String str = "";
			try {
				str = br.readLine();
			} catch (IOException e) {
				e.printStackTrace();
			}
			return str;
		}
	}

	public static void main(String[] args) throws IOException {
		FastReader sc = new FastReader();
		Set<Character> set = new HashSet<>();
		int n=sc.nextInt();
		for(int i=0;i<n;i++){
			char[] ch = sc.next().toCharArray();
			set.add(ch[0]);
		}
//		System.out.println(set.size());
		System.out.println(set.size()==3?"Three":"Four");
//		codeChefQ2(sc);
//		codeChefQ3(sc);
}

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

#include<stdio.h>

int main(void){
  
  int N;
  scanf("%d", &N);
  char s[N];
  for (int i = 0; i<N; i++) {
    scanf("%s", &s[i]);
  }
  
  
  int p = 0;
  int w = 0;
  int g = 0;
  int y = 0;
  
  for (int i = 0; i<N; i++) {
    if (s[i] == 'P') p++;
    if (s[i] == 'W') w++;
    if (s[i] == 'G') g++;
    if (s[i] == 'Y') y++;
  }
  
  
  if (p != 0 && w != 0 && g != 0 && y != 0) {
    printf("Four");
  } else {
    printf("Three");
  }
  
  return 0;

Compiler output:
main.c: In function 'main':
main.c:32:3: error: expected declaration or statement at end of input
   32 |   return 0;
      |   ^~~~~~
Language: C++

#include<cstdio>
#include<iostream>
#include<stdio.h>
#include<string.h>
#include<cstring>
#include<algorithm>
#include<cmath>
using namespace std;
int main(){
    char s[205];
    int t[105],m=0,n;
    scanf("%d",&n);
    getchar();
    gets(s);
    n=strlen(s);
    for(int i=0;i<n;i++)
    if(s[i]!=' ') t[m++]=s[i]-'A';
    sort(t,t+m);
    n=unique(t,t+m)-t;
    if(n==3) printf("Three");
    else printf("Four");
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:5: error: 'gets' was not declared in this scope; did you mean 'getw'?
   14 |     gets(s);
      |     ^~~~
      |     getw
Language: C++

#include <iostream>
#include <string>
#include <algorithm>
#include <vector>
#include<queue>
#include<set>
#include<climits>
using namespace std;

int main()
{
  int n;
  char = a;
  cin >> n;

  for (int i = 0; i < n; i++)
  {
    cin >> a;
    if (a == 'Y')
    {
      cout << "Four" << endl;
      exit(0);
    }
  }

  cout << "Three" << endl;

}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:8: error: expected unqualified-id before '=' token
   13 |   char = a;
      |        ^
a.cc:18:12: error: 'a' was not declared in this scope
   18 |     cin >> a;
      |            ^
Language: C++

#include<cstdio>
#include<stdio.h>
#include<string.h>
#include<cstring>
#include<algorithm>
#include<cmath>
using namespace std;
int main(){
    char s[205];
    int t[105],m=0,n;
    scanf("%d",&n);
    getchar();
    gets(s);
    n=strlen(s);
    for(int i=0;i<n;i++)
    if(s[i]!=' ') t[m++]=s[i]-'A';
    sort(t,t+m);
    n=unique(t,t+m)-t;
    if(n==3) printf("Three");
    else printf("Four");
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:5: error: 'gets' was not declared in this scope; did you mean 'getw'?
   13 |     gets(s);
      |     ^~~~
      |     getw
Language: C++

#include<cstdio>
#include<cstring>
#include<algorithm>
#include<cmath>
using namespace std;
int main(){
    char s[205];
    int t[105],m=0,n;
    scanf("%d",&n);
    getchar();
    gets(s);
    n=strlen(s);
    for(int i=0;i<n;i++)
    if(s[i]!=' ') t[m++]=s[i]-'A';
    sort(t,t+m);
    n=unique(t,t+m)-t;
    if(n==3) printf("Three");
    else printf("Four");
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:5: error: 'gets' was not declared in this scope; did you mean 'getw'?
   11 |     gets(s);
      |     ^~~~
      |     getw
Language: C++

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

int main(){
    int a;
    string s;
    cin>> a;
    string s;
    getline(cin,s);

    for(int n=0; n<a; n++)
    {
        if(s[n]=="Y")
        {
            cout<<"Four"<<"\n";
            return 0;
        }

    }


    cout<< "Three" <<"\n";

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:12: error: redeclaration of 'std::string s'
    9 |     string s;
      |            ^
a.cc:7:12: note: 'std::string s' previously declared here
    7 |     string s;
      |            ^
a.cc:14:16: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   14 |         if(s[n]=="Y")
Language: C++

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


int main(void)
{
	int n,k=0;
	char s;
	int i,j,k;
	scanf("%d",&n);
	for(i=1;i<=n;i++){scanf("%c",&s);if(s=='Y'){k=1;}}
	
	
	
	
	
	if(k==1){printf("Four\n");}else{printf("Three\n");}
	
	return 0;
}




Compiler output:
a.cc: In function 'int main()':
a.cc:12:17: error: redeclaration of 'int k'
   12 |         int i,j,k;
      |                 ^
a.cc:10:15: note: 'int k' previously declared here
   10 |         int n,k=0;
      |               ^
Language: C++

#include <iostream>
using namespace std;
 
int main() {
	int n;
  char a;
  cin>>n;
  int ans=0;
for(int i=0;i<n;i++){
  cin>>a;
  if(a=='Y')ans=1;
  }
  
  if(ans)cout<<"Four"
  else{cout<<"Three"}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:22: error: expected ';' before 'else'
   14 |   if(ans)cout<<"Four"
      |                      ^
      |                      ;
   15 |   else{cout<<"Three"}
      |   ~~~~
Language: C++

#include <iostream>
#include <cstdio>
#include <algorithm>
#include <set>
#include <string>
#include <cstring>
#include <cmath>
#include <map>
#include <stack>
#define N 1005
using namespace std;
typedef long long ll;
char s[105];
int main()
{
    int a[10];
    int n,sum=0;
    memset(a,0,sizeof(a));
    scanf("%d",&n);
    getchar();
    gets(s);
    int len=strlen(s);
    for(int i=0; i<len; i++)
    {
        if(s[i]=='P')
            a[1]=1;
        if(s[i]=='W')
            a[2]=1;
        if(s[i]=='G')
            a[3]=1;
        if(s[i]=='Y')
            a[4]=1;

    }
    for(int i=1;i<=4;i++)
        if(a[i]==1)
        sum++;

    if(sum==3)
        printf("Three\n");
        else
        printf("Four\n");

}


Compiler output:
a.cc: In function 'int main()':
a.cc:21:5: error: 'gets' was not declared in this scope; did you mean 'getw'?
   21 |     gets(s);
      |     ^~~~
      |     getw
Language: C++

#include <iostream>
using namespace std;

int main() {
	int n;
  char a;
  cin>>n;
  int ans=0;
for(int i=0;i<n;i++){
  cin>>a;
  if(a=='Y')ans=1;
  }
  
  if(ans)cout<<"Four";
  else{cout<<"Three"}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:21: error: expected ';' before '}' token
   15 |   else{cout<<"Three"}
      |                     ^
      |                     ;
Language: C

//Date : Sun Feb 25 21:33:21 2018
//Author : Rishabh Paul
 
#include<stdio.h>
#include<string.h>
#include<stdlib.h>
#include<stdbool.h>
#include<float.h>
#include<math.h>
#include<inttypes.h>
#include<assert.h>
#include<ctype.h>
#include<limits.h>
#include<time.h>
#define ll long long
#define For(i,n)	for(int i=0;i<n;i++)
#define rep(i ,a ,b)	for(int i=(a);i<=(b);i++)
#define mset(a ,value)	memset(a ,value ,sizeof(a))
#define s(a)	scanf("%d" ,&a);
#define ls(a)	scanf("%ld" ,&a)
#define reg(i)	register int i
#define infinite INT_MAX
#define MAX 100005
#define LEFT(i)	2*i + 1
#define RIGHT(i)	2*i + 2
#define EPS 0.00000000000001
#define NIL -1
int min(int a,int b){	return (a<b?a:b);	}
int max(int a,int b){	return (a>b?a:b);	}
int cmp(const void *a ,const void *b){
	int *a1 = (int *)a;
	int *b1 = (int *)b;
	if((*a1) > (*b1))	return 1;
	if((*a1) == (*b1))	return 0;
	return -1;
}
int a[4];
int main(){
	int n;
	char c;
	s(n);
	For(i ,n){
		scanf(" %c" ,&c);
		if(c == 'P')	a[0]++;
		else if(c == 'W')	a[1]++;
		else if(c == 'G')	a[2]++;
		else a[3]++;
	}
	pus(a[3] ? "Four" : "Three");
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:49:9: error: implicit declaration of function 'pus'; did you mean 'puts'? [-Wimplicit-function-declaration]
   49 |         pus(a[3] ? "Four" : "Three");
      |         ^~~
      |         puts
Language: C++

#include "stdafx.h"
#include <tchar.h>

#include <stdio.h>
#include <cstdlib>
#include <iostream>
#include <string>
#include <set>
#include <tuple>
#include <algorithm>
#include <unordered_map>
#include <vector>

using namespace std;

int main()
{
	int N;
	cin >> N;
	char arare;
	for (int i = 0; i < N; i++) {
		cin >> arare;
		if (arare == 'Y') {
			cout << "Four";
			return 0;
		}
	}
	cout << "Three";
	return 0;
}







Compiler output:
a.cc:1:10: fatal error: stdafx.h: No such file or directory
    1 | #include "stdafx.h"
      |          ^~~~~~~~~~
compilation terminated.
Language: C

//Date : Sun Feb 25 21:33:21 2018
//Author : Rishabh Paul
 
#include<stdio.h>
#include<string.h>
#include<stdlib.h>
#include<stdbool.h>
#include<float.h>
#include<math.h>
#include<inttypes.h>
#include<assert.h>
#include<ctype.h>
#include<limits.h>
#include<time.h>
#define ll long long
#define For(i,n)	for(int i=0;i<n;i++)
#define rep(i ,a ,b)	for(int i=(a);i<=(b);i++)
#define mset(a ,value)	memset(a ,value ,sizeof(a))
#define s(a)	scanf("%d" ,&a);
#define ls(a)	scanf("%ld" ,&a)
#define reg(i)	register int i
#define infinite INT_MAX
#define MAX 100005
#define LEFT(i)	2*i + 1
#define RIGHT(i)	2*i + 2
#define EPS 0.00000000000001
#define NIL -1

int a[MAX];
int min(int a,int b){	return (a<b?a:b);	}
int max(int a,int b){	return (a>b?a:b);	}
int cmp(const void *a ,const void *b){
	int *a1 = (int *)a;
	int *b1 = (int *)b;
	if((*a1) > (*b1))	return 1;
	if((*a1) == (*b1))	return 0;
	return -1;
}
int a[4];
int main(){
	int n;
	char c;
	s(n);
	For(i ,n){
		scanf(" %c" ,&c);
		if(c == 'P')	a[0]++;
		else if(c == 'W')	a[1]++;
		else if(c == 'G')	a[2]++;
		else a[3]++;
	}
	pus(a[3] ? "Four" : "Three");
	return 0;
}

Compiler output:
main.c:39:5: error: conflicting types for 'a'; have 'int[4]'
   39 | int a[4];
      |     ^
main.c:29:5: note: previous declaration of 'a' with type 'int[100005]'
   29 | int a[MAX];
      |     ^
main.c: In function 'main':
main.c:51:9: error: implicit declaration of function 'pus'; did you mean 'puts'? [-Wimplicit-function-declaration]
   51 |         pus(a[3] ? "Four" : "Three");
      |         ^~~
      |         puts
Language: C++

include <iostream>
using namespace std;

int main(){
    int n;
    char c;
    cin >> n;
    for(int i=0; i!=n; i++){
        cin >> c;
        if(c == 'Y'){
            cout << "Four\n";
            return 0;
        }
    }
    cout << "Three\n";
    return 0;
}

Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include <iostream>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:7:5: error: 'cin' was not declared in this scope
    7 |     cin >> n;
      |     ^~~
a.cc:11:13: error: 'cout' was not declared in this scope
   11 |             cout << "Four\n";
      |             ^~~~
a.cc:15:5: error: 'cout' was not declared in this scope
   15 |     cout << "Three\n";
      |     ^~~~
Language: C++

#include <iostream>
using namespace std;
int main()
{
        int n,four=0;
        char arare;

        cin >> n;

        for(int i=0;i<n;i++){
                cin >> arare;
                if(arare=='Y') four=1
        }

        if(four) cout << "Four" endl;
        else cout << "Three" << endl;

        return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:38: error: expected ';' before '}' token
   12 |                 if(arare=='Y') four=1
      |                                      ^
      |                                      ;
   13 |         }
      |         ~                             
a.cc:15:32: error: expected ';' before 'endl'
   15 |         if(four) cout << "Four" endl;
      |                                ^~~~~
      |                                ;
Language: C++

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

int main(){
  int N,flag;
  char S[100];
  cin >> N;
  for(int i = 0; i>N;i++){
    cin >> S[i];
    if(S[i] == "Y"){
      flag = 1;
    }
  }
  if (flag == 1){
    cout << "Four" <<endl;
  }else{
    cout << "Three" <<endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:13: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   11 |     if(S[i] == "Y"){
      |        ~~~~~^~~~~~
Language: C++

        #include <bits/stdc++.h>
         
        using namespace std;
         
        map<char, bool>mp;
        int n;
         
        int main() {
        	scanf("%d", &n);	
        	char ch;
        	for(int i = 1; i <= n; i++){
        		cin>>ch;
        		if(!mp[ch]) {
        			mp[ch]=1;
        		}
        	}
    res += mp['P'] + mp['W'] + mp['G'] + mp['Y'];
        	printf(res == 4 ? "FOUR\n" : "THREE\n");
        	return 0;
        }

Compiler output:
a.cc: In function 'int main()':
a.cc:17:5: error: 'res' was not declared in this scope
   17 |     res += mp['P'] + mp['W'] + mp['G'] + mp['Y'];
      |     ^~~
Language: C

//Date : Sun Feb 25 21:33:21 2018
//Author : Rishabh Paul
 
#include<stdio.h>
#include<string.h>
#include<stdlib.h>
#include<stdbool.h>
#include<float.h>
#include<math.h>
#include<inttypes.h>
#include<assert.h>
#include<ctype.h>
#include<limits.h>
#include<time.h>
#define ll long long
#define For(i,n)	for(int i=0;i<n;i++)
#define rep(i ,a ,b)	for(int i=(a);i<=(b);i++)
#define mset(a ,value)	memset(a ,value ,sizeof(a))
#define s(a)	scanf("%d" ,&a);
#define ls(a)	scanf("%ld" ,&a)
#define reg(i)	register int i
#define infinite INT_MAX
#define MAX 100005
#define LEFT(i)	2*i + 1
#define RIGHT(i)	2*i + 2
#define EPS 0.00000000000001
#define NIL -1

int a[MAX];
int min(int a,int b){	return (a<b?a:b);	}
int max(int a,int b){	return (a>b?a:b);	}
int cmp(const void *a ,const void *b){
	int *a1 = (int *)a;
	int *b1 = (int *)b;
	if((*a1) > (*b1))	return 1;
	if((*a1) == (*b1))	return 0;
	return -1;
}
int a[4]
int main(){
	int n;
	char *s = "PWGY" ,c;
	s(n);
	For(i ,n){
		scanf(" %c" ,&c);
		if(c == 'P')	a[0]++;
		else if(c == 'W')	a[1]++;
		else if(c == 'G')	a[2]++;
		else a[3]++;
	}
	pus(a[3] ? "Four" : "Three");
	return 0;
}

Compiler output:
main.c:39:9: error: expected ';' before 'int'
   39 | int a[4]
      |         ^
      |         ;
   40 | int main(){
      | ~~~      
main.c: In function 'main':
main.c:51:9: error: implicit declaration of function 'pus'; did you mean 'puts'? [-Wimplicit-function-declaration]
   51 |         pus(a[3] ? "Four" : "Three");
      |         ^~~
      |         puts
Language: C++

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

int main(){
  int N,flag;
  char S[100];
  cin >> N;
  for (int i = 0; i>N;i++){
    cin >> S[i];
    if (S[i] == "Y"){
      flag = 1;
    }
  }
  if (flag == 1){
    cout << "Four" <<endl;
  }else{
    cout << "Three" <<endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:14: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   11 |     if (S[i] == "Y"){
      |         ~~~~~^~~~~~
Language: C++

    #include <bits/stdc++.h>
     
    using namespace std;
     
    map<char, bool>mp;
    int n;
     
    int main() {
    	scanf("%d", &n);	
    	char ch;
    	for(int i = 1; i <= n; i++){
    		cin>>ch;
    		if(!mp[ch]) {
    			mp[ch]=1;
    		}
    	}
res += mp['P'] + mp['W'] + mp['G'] + mp['Y'];
    	printf(res == 4 ? "FOUR\n" : "Three\n");
    	return 0;
    }

Compiler output:
a.cc: In function 'int main()':
a.cc:17:1: error: 'res' was not declared in this scope
   17 | res += mp['P'] + mp['W'] + mp['G'] + mp['Y'];
      | ^~~
Language: C++

#include<iostream>
#include<vector>
#include<string>
#include<map>
#include<set>
#include<algorithm>

using namespace std;

typedef long long int int;

int main(void) {
    map<char,int> m;

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

    if(m.size() == 3) {
        cout<<"three"<<endl;
    } else {
        cout<<"four"<<endl;
    }

    return 0;
}


Compiler output:
a.cc:10:19: error: multiple types in one declaration
   10 | typedef long long int int;
      |                   ^~~
a.cc:10:23: error: declaration does not declare anything [-fpermissive]
   10 | typedef long long int int;
      |                       ^~~
Language: C++

#include <iostream>

using namespace std;

int main(void){
  int c[4] = {};
  int N;
  cin >> N;
  for(int i = 0; i < N; i++){
    char c;
    cin >> c;
    switch(c){
      case 'P': c[0]=1; break;
      case 'Y': c[1]=1; break;
      case 'W': c[2]=1; break;
      case 'G': c[3]=1; break;
    }
  }
  if(c[0] + c[1] + c[2] + c[3] == 3) cout << "Three" << endl;
  else cout << "Four" << endl;
  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:18: error: invalid types 'char[int]' for array subscript
   13 |       case 'P': c[0]=1; break;
      |                  ^
a.cc:14:18: error: invalid types 'char[int]' for array subscript
   14 |       case 'Y': c[1]=1; break;
      |                  ^
a.cc:15:18: error: invalid types 'char[int]' for array subscript
   15 |       case 'W': c[2]=1; break;
      |                  ^
a.cc:16:18: error: invalid types 'char[int]' for array subscript
   16 |       case 'G': c[3]=1; break;
      |                  ^
Language: C++

    #include <bits/stdc++.h>
     
    using namespace std;
     
    map<char, bool>mp;
    int n;

     
    int main() {
    	scanf("%d", &n);	
    	char ch;
    	for(int i = 1; i <= n; i++){
    		cin>>ch;
    		if(!mp[ch]) {
    			mp[ch]=1;
    			res++;
    		}
    	}
    	printf(res == 4 ? "FOUR\n" : "Three\n");
    	return 0;
    }

Compiler output:
a.cc: In function 'int main()':
a.cc:16:25: error: 'res' was not declared in this scope
   16 |                         res++;
      |                         ^~~
a.cc:19:16: error: 'res' was not declared in this scope
   19 |         printf(res == 4 ? "FOUR\n" : "Three\n");
      |                ^~~
Language: C++

#include <bits/stdc++.h>

using namespace std;

map<char, bool>mp;
int n;

int main() {
	scanf("%d", &n);	
	char ch;
	for(int i = 1; i <= n; i++){
		cin>>ch;
		if(!mp[ch]) {
			mp[ch]=1;
			res++;
		}
	}
	printf(res == 4 ? "FOUR\n" : "Three\n");
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:25: error: 'res' was not declared in this scope
   15 |                         res++;
      |                         ^~~
a.cc:18:16: error: 'res' was not declared in this scope
   18 |         printf(res == 4 ? "FOUR\n" : "Three\n");
      |                ^~~
Language: Java

import java.util.HashSet;
import java.util.Scanner;
import java.util.Set;

public class B {
	public static void main(String[] args) {
		final Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		Set<String> set = new HashSet<>();
		for (int i = 0; i < n; i++) {
			set.add(sc.next());
		}
		System.out.println(set.size());
	}
}


Compiler output:
Main.java:5: error: class B is public, should be declared in a file named B.java
public class B {
       ^
1 error
Language: C++

#include<bits/stdc++.h>
using namespace std;
//KASRA FOULADI;
int main(){
    long long int n, ans = 0;
    cin >> n;
    int cnt[26] = {};
    char s[21];
    for(int i = 0; i < n; ++i){
        cin >> s;
        ++cnt[s[0] - 65];
    }
    for(int i = 0; i < 24; ++i)
        for(int j = i + 1; j < 25; ++j)
            for(int k = j + 1; k < 26; ++k)
                ans += cnt[i]  cnt[j]  cnt[k];
    cout << ans << '\n';
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:30: error: expected ';' before 'cnt'
   16 |                 ans += cnt[i]  cnt[j]  cnt[k];
      |                              ^ ~~~
      |                              ;
Language: C++

#include <algorithm>
#include <array>
#include <atcoder/all>
#include <bitset>
#include <cassert>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <limits>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <random>
#include <regex>
#include <set>
#include <stack>
#include <string>
#include <tuple>
#include <unordered_map>
#include <unordered_set>
#include <utility>
#include <valarray>
#include <vector>
using namespace std;
using namespace atcoder;

using ll = long long;
using ld = long double;
using mint = modint;
const int INF = 1e9;
const double EPS = 1e-9;
const int MOD = 1e9 + 7;

int main()
{
  long long N;
  scanf("%lld", &N);
  std::vector<std::string> S(N);
  map<char, ll> mp;
  for (int i = 0; i < N; i++)
  {
    std::cin >> S[i];
    mp[S[i][0]]++;
  }
  vector<char> t = {'M', 'A', 'R', 'C', 'H'};
  ll ans = 0;
  for (int i = 0; i < t.size(); ++i)
  {
    for (int j = i + 1; j < t.size(); ++j)
    {
      for (int k = j + 1; k < t.size(); ++k)
        ans += mp[t[i]] * mp[t[j]] * mp[t[k]];
    }
  }
  cout << ans << endl;

  return 0;
}


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

#include <iostream>
#include <cmath>
#include <vector>
#include <map>
#include <iomanip>
#include <algorithm>
#include <sstream>
#include <string>
#include <math.h>
#include <set>
using namespace std;
typedef long long ll;
 
int main() {
    ios::sync_with_stdio(false);
    cin.tie(0);
    int n , m = 0 , a = 0 , r = 0 , c = 0 , h = 0;
    cin >> n;
    string a[n];
    for( int i = 0 ; i < n ; i++ ) cin >> a[i];
    for( int i = 0 ; i < n ; i++ ) {
        if( a[i][0] == 'M' ) m++;
        else if( a[i][0] == 'A' ) a++;
        else if( a[i][0] == 'R' ) r++;
        else if( a[i][0] == 'C' ) c++;
        else if( a[i][0] == 'H' ) h++;
    }
    if( m != 0 ) x++;
    else m++;
    if( a != 0 ) x++; 
    else a++;
    if( r != 0 ) x++;
    else r++;
    if( c != 0 ) x++;
    else c++;
    if( h != 0 ) x++;
    else h++;
    if( x < 3 ) cout << 0;
    else cout << m * a * r * c * h;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:12: error: conflicting declaration 'std::string a [n]'
   19 |     string a[n];
      |            ^
a.cc:17:21: note: previous declaration as 'int a'
   17 |     int n , m = 0 , a = 0 , r = 0 , c = 0 , h = 0;
      |                     ^
a.cc:20:44: error: invalid types 'int[int]' for array subscript
   20 |     for( int i = 0 ; i < n ; i++ ) cin >> a[i];
      |                                            ^
a.cc:22:14: error: invalid types 'int[int]' for array subscript
   22 |         if( a[i][0] == 'M' ) m++;
      |              ^
a.cc:23:19: error: invalid types 'int[int]' for array subscript
   23 |         else if( a[i][0] == 'A' ) a++;
      |                   ^
a.cc:24:19: error: invalid types 'int[int]' for array subscript
   24 |         else if( a[i][0] == 'R' ) r++;
      |                   ^
a.cc:25:19: error: invalid types 'int[int]' for array subscript
   25 |         else if( a[i][0] == 'C' ) c++;
      |                   ^
a.cc:26:19: error: invalid types 'int[int]' for array subscript
   26 |         else if( a[i][0] == 'H' ) h++;
      |                   ^
a.cc:28:18: error: 'x' was not declared in this scope
   28 |     if( m != 0 ) x++;
      |                  ^
a.cc:30:18: error: 'x' was not declared in this scope
   30 |     if( a != 0 ) x++;
      |                  ^
a.cc:32:18: error: 'x' was not declared in this scope
   32 |     if( r != 0 ) x++;
      |                  ^
a.cc:34:18: error: 'x' was not declared in this scope
   34 |     if( c != 0 ) x++;
      |                  ^
a.cc:36:18: error: 'x' was not declared in this scope
   36 |     if( h != 0 ) x++;
      |                  ^
a.cc:38:9: error: 'x' was not declared in this scope
   38 |     if( x < 3 ) cout << 0;
      |         ^
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:
main.c:1:11: fatal error:  cstdio : No such file or directory
    1 | # include < cstdio >
      |           ^~~~~~~~~~
compilation terminated.
Language: C++

#define _CRT_SECURE_NO_WARNINGS

#include <iostream>
#include <vector>
#include <algorithm>
#include <string>
#include <functional>

struct Combination {
    int a;
    int b;
    int c;
};

using namespace std;

vector<Combination> v_c; 

void recursive_comb(vector<int>& indexes, int s, int rest, std::function<void(vector<int> &)> f) {
	if (rest == 0) {
		f(indexes);
	} else {
		if (s < 0) return;
		recursive_comb(indexes, s - 1, rest, f);
		indexes[rest - 1] = s;
		recursive_comb(indexes, s - 1, rest - 1, f);
	}
	return;
}

void foreach_comb(int n, int k, std::function<void(vector<int> &)> f) {
	vector<int> indexes(k);
	recursive_comb(indexes, n - 1, k, f);
	return;
}

int main() {
	int n;
	cin >> n;
	
	vector<int> v_num(5, 0);
	for (int i = 0; i < n; ++i) {
		string str; cin >> str;
		if (str[0] == 'M') v_num[0]++;
		if (str[0] == 'A') v_num[1]++;
		if (str[0] == 'R') v_num[2]++;
		if (str[0] == 'C') v_num[3]++;
		if (str[0] == 'H') v_num[4]++;
	}

	v_c.reserve(10);
	foreach_comb(5, 3, [](vector<int>& indexes) {
		Combination c{ indexes[0], indexes[1], indexes[2] };
		v_c.push_back(c);
	});

	long long int score = 0;
	for (int i = 0; i < v_c.size(); i++) {
		score += long long int (v_num[v_c[i].a] * v_num[v_c[i].b] * v_num[v_c[i].c] );
	}

	cout << score << endl;

	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:59:26: error: expected primary-expression before 'long'
   59 |                 score += long long int (v_num[v_c[i].a] * v_num[v_c[i].b] * v_num[v_c[i].c] );
      |                          ^~~~
Language: C++

#include <iostream>
#include <vector>
#include <string>
#include <unordered_set>
#include <unordered_map>
#include <sstream>
#include <algorithm>
#include <cmath>
#include <map>
#include <set>
#include <numeric>
#include <iterator>

#define repAll(n) (n).begin(), (n).end()
#define repConAll(n) (n).cbegin(), (n).cend()

using namespace std;

#if 1 //@@@ 19
namespace {

}
#if 0
int DFS(char header, int num, set<char> setHeader, set<string>& setS, int depth)
{
	setHeader.insert(header);

	if (setHeader.size() == 3){
		return 1;
	}
	else if ()


	if (setHeader.size() == 3){
		return 1;
	}
	return DFS()


}
#endif

int main()
{
	int N;
	//vector<string> S;
	set<string> setS;
	set<char> h1{ 'M', 'A', 'R', 'C', 'H' };
	map<char, int> countS;

	cin >> N;

	countS['M'] = 0;
	countS['A'] = 0;
	countS['R'] = 0;
	countS['C'] = 0;
	countS['H'] = 0;
	vector<char> vctHeader{ 'M', 'A', 'R', 'C', 'H' };


	for (int i = 0; i < N; ++i){
		string sTmp;
		cin >> sTmp;
		switch (sTmp[0]){
		case 'M': case 'A': case'R': case 'C': case 'H':
			setS.insert(sTmp);
			if (countS.count(sTmp[0]) == 0){
				countS[sTmp[0]] = 1;
			}
			else {
				++countS[sTmp[0]];
			}
			break;
		}
	}

	long long num = 0;
	long long sizeS = setS.size();
	if (setS.size() >= 3){

		set<char> setHeader;
		for (int i = 0; i < vctHeader.size(); ++i){
			for (int j = i + 1; i < i < vctHeader.size(); ++j){
				for (int k = j + 1; j < i < vctHeader.size(); ++k){

						num += countS[i] * countS[j] * countS[k];
					}
				}
			}
		}
	}

	cout << num << endl;



	return 0;
}

Compiler output:
a.cc:19: error: unterminated #if
   19 | #if 1 //@@@ 19
a.cc:93:9: error: 'cout' does not name a type
   93 |         cout << num << endl;
      |         ^~~~
a.cc:97:9: error: expected unqualified-id before 'return'
   97 |         return 0;
      |         ^~~~~~
a.cc:98:1: error: expected declaration before '}' token
   98 | }
      | ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define int long long
signed main() {
    int N;
    cin >> N;
    vector<string>a(N);
    for(int i = 0; i < N; i++) {
        cin >> a[i];
    }
    int A[6];
    for(int i = 0; i < N; i++) {
        if(a[i][0] == 'M') {
            A[0]++;
        }
        if(a[i][0] == 'A') {
            A[1]++;
        }
        if(a[i][0] == 'R') {
            A[2]++;
        }
        if(a[i][0] == 'C') {
            A[3]++;
        }
        if(a[i][0] == 'H') {
            A[4]++;
        }
    }
    int ans = 0;
    for(int i = 0; i < N; i++) {
        for(int j = i+1; j < N; j++) {
            for(int k = j+1: k < N; k++) {
               ans+=A[i]*A[j]*[k];
            }
        }
    }
    cout  << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:32:23: error: initializer in range-based 'for' loop
   32 |             for(int k = j+1: k < N; k++) {
      |                       ^
a.cc:32:35: error: expected ')' before ';' token
   32 |             for(int k = j+1: k < N; k++) {
      |                ~                  ^
      |                                   )
a.cc:32:37: error: 'k' was not declared in this scope
   32 |             for(int k = j+1: k < N; k++) {
      |                                     ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define int long long
signed main(){
    int N;
    cin >> N;
    vector<string>S(N);
    map<string,int>Map;
    for(int i = 0; i < N; i++) {
        cin >> S[i];
        Map[S[i]]++;
    }
    int cnt = 0;
    for(int i = 0; i < N; i++) {
        if(Map[S[i]] == 1) {
            if(S[i][0] == 'M' || S[i][0] == 'A' || S[i][0] == 'R'
              || S[i][0] == 'C' || S[i][0] == 'H') {
                cnt++;
            }
        }
    }
    cout << max((cnt*(cnt-1)*(cnt-2))/6,0) << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:16: error: no matching function for call to 'max(long long int, int)'
   22 |     cout << max((cnt*(cnt-1)*(cnt-2))/6,0) << endl;
      |             ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note:   template argument deduction/substitution failed:
a.cc:22:16: note:   deduced conflicting types for parameter 'const _Tp' ('long long int' and 'int')
   22 |     cout << max((cnt*(cnt-1)*(cnt-2))/6,0) << endl;
      |             ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note:   candidate expects 3 arguments, 2 provided
In file included from /usr/include/c++/14/algorithm:61:
/usr/include/c++/14/bits/stl_algo.h:5706:5: note: candidate: 'template<class _Tp> constexpr _Tp std::max(initializer_list<_Tp>)'
 5706 |     max(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5706:5: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_algo.h:5716:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::max(initializer_list<_Tp>, _Compare)'
 5716 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5716:5: note:   template argument deduction/substitution failed:
a.cc:22:16: note:   mismatched types 'std::initializer_list<_Tp>' and 'long long int'
   22 |     cout << max((cnt*(cnt-1)*(cnt-2))/6,0) << endl;
      |             ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
Language: C++

#include <bits/stdc++.h>
typedef long long ll;
using namespace std;
ll backet[5] = {0};

int main() {
  int n; cin >> n;
  // どの３つが選択されたかを表す配列３つ
  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,2,4,4,3,4,4,4};
  
  for(int i = 0; i < n; ++i) {
    string s; cin >> s;
    if(s[0] == 'M') bucket[0]++;
    else if(s[0] == 'A') bucket[1]++;
    else if(s[0] == 'R') bucket[2]++;
    else if(s[0] == 'C') bucket[3]++;
    else if(s[0] == 'H') bucket[4]++;
  }
  ll ans = 0;
  for(int i = 0; i < 10; ++i) {
    ans += bucket[p[d]] * bucket[q[d]] * bucket[r[d]];
  }
  cout << ans << endl;
  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:21: error: 'bucket' was not declared in this scope; did you mean 'backet'?
   15 |     if(s[0] == 'M') bucket[0]++;
      |                     ^~~~~~
      |                     backet
a.cc:16:26: error: 'bucket' was not declared in this scope; did you mean 'backet'?
   16 |     else if(s[0] == 'A') bucket[1]++;
      |                          ^~~~~~
      |                          backet
a.cc:17:26: error: 'bucket' was not declared in this scope; did you mean 'backet'?
   17 |     else if(s[0] == 'R') bucket[2]++;
      |                          ^~~~~~
      |                          backet
a.cc:18:26: error: 'bucket' was not declared in this scope; did you mean 'backet'?
   18 |     else if(s[0] == 'C') bucket[3]++;
      |                          ^~~~~~
      |                          backet
a.cc:19:26: error: 'bucket' was not declared in this scope; did you mean 'backet'?
   19 |     else if(s[0] == 'H') bucket[4]++;
      |                          ^~~~~~
      |                          backet
a.cc:23:12: error: 'bucket' was not declared in this scope; did you mean 'backet'?
   23 |     ans += bucket[p[d]] * bucket[q[d]] * bucket[r[d]];
      |            ^~~~~~
      |            backet
a.cc:23:21: error: 'd' was not declared in this scope
   23 |     ans += bucket[p[d]] * bucket[q[d]] * bucket[r[d]];
      |                     ^
Language: C++

#include <iostream>
#include <algorithm>
#include <iterator>
#include <vector>
#include <string>

using namespace std;

int main() {
  int N;
  cin >> N;
  vector<string> S(N);
  copy_n(istream_iterator<string>(cin), N, S.begin());
  int64_t m[256] = {0};
  for (auto& item : S) {
    ++(m[item[0]]);
  }

  int64_t result = 0;
  for (size_t i = 0; i < march.size() - 2; ++i) {
    for (size_t j = i + 1; j < march.size() - 1; ++j) {
      for (size_t k = j + 1; k < march.size(); ++k) {
        result += m[march[i]] * m[march[j]] * m[march[k]];
      }
    }
  }
  cout << result << endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:20:26: error: 'march' was not declared in this scope; did you mean 'rpmatch'?
   20 |   for (size_t i = 0; i < march.size() - 2; ++i) {
      |                          ^~~~~
      |                          rpmatch
Language: C++

use std::io::{self, BufRead};

fn readline() -> String {
    let mut line = String::new();
    io::stdin().lock().read_line(&mut line).unwrap();
    line.trim().to_string()
}

fn id(first: char) -> Option<usize> {
    let str = "MARCH";
    for (i, c) in str.chars().enumerate() {
        if c == first {
            return Some(i);
        }
    }
    None
}

fn main() {
    let n: i32 = readline().parse().unwrap();
    let mut count: [i32; 5] = [0, 0, 0, 0, 0];

    for i in 0..n {
        let str = readline();
        if let Some(j) = id(str.chars().next().unwrap()) {
            count[j] = count[j] + 1;
        }
    }

    let mut ans: i32 = 0;

    for i in 0..5 {
        for j in i+1..5 {
            for k in j+1..5 {
                ans += count[i] * count[j] * count[k];
            }
        }
    }

    println!("{}", ans);
}

Compiler output:
a.cc:23:14: error: too many decimal points in number
   23 |     for i in 0..n {
      |              ^~~~
a.cc:32:14: error: too many decimal points in number
   32 |     for i in 0..5 {
      |              ^~~~
a.cc:33:20: error: too many decimal points in number
   33 |         for j in i+1..5 {
      |                    ^~~~
a.cc:34:24: error: too many decimal points in number
   34 |             for k in j+1..5 {
      |                        ^~~~
a.cc:1:1: error: 'use' does not name a type
    1 | use std::io::{self, BufRead};
      | ^~~
a.cc:3:1: error: 'fn' does not name a type
    3 | fn readline() -> String {
      | ^~
a.cc:9:1: error: 'fn' does not name a type
    9 | fn id(first: char) -> Option<usize> {
      | ^~
a.cc:19:1: error: 'fn' does not name a type
   19 | fn main() {
      | ^~
Language: C++

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



int main(){
	int n;
	cin >> n;
	string s;
	vector<ll> b(5);
	rep(i, 5) b.at(i) = 0;
	rep(i, n){
		cin >> s;
		a[s.at(0)]++;
		if(s.at(0) == 'M') b.at(0)++;
		if(s.at(0) == 'A') b.at(1)++;
		if(s.at(0) == 'R') b.at(2)++;
		if(s.at(0) == 'C') b.at(3)++;
		if(s.at(0) == 'H') b.at(4)++;
	}
	ll ans = 0;

	ans += b.at(0)*b.at(1)*b.at(2);
	ans += b.at(1)*b.at(2)*b.at(3);
	ans += b.at(2)*b.at(3)*b.at(4);
	ans += b.at(3)*b.at(4)*b.at(0);
	ans += b.at(4)*b.at(0)*b.at(1);
	ans += b.at(0)*b.at(2)*b.at(3);
	ans += b.at(1)*b.at(3)*b.at(4);
	ans += b.at(2)*b.at(4)*b.at(0);
	ans += b.at(3)*b.at(0)*b.at(1);
	ans += b.at(4)*b.at(1)*b.at(2);

	cout << ans << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:17: error: 'a' was not declared in this scope
   17 |                 a[s.at(0)]++;
      |                 ^
Language: C++

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

int main(){
  string s="MARCH";
  int c[5]={};
  int n;
  cin >> n;
  rep(i,n){
    string t;
    cin >> t;
    rep (j,5){
      if (t[0]==s[j]){
        c[j]++;
      }
    }
  }
  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;++k){
        ans+=c[i]*c[j]*c[k];
      }
    }
  }
  cout << ans << endl;
  return 0;
}
 

Compiler output:
a.cc: In function 'int main()':
a.cc:14:19: error: 'j' was not declared in this scope
   14 |       if (t[0]==s[j]){
      |                   ^
Language: C++

#include <bits/stdc++.h>

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

int main(){
int n;
cin>>n;
string S[n];
map<char,ll>m;
rep(i,n){
  cin>>S[i];
  m[S[i][0]]++;
}
char a[5]={'M','A','R','C','H'};
ll count=0;
for(int i=0;i<3;i++){
  for(int j=i+1;j<4;j++){
    for(int k=j+1;k<5;k++){

count+=ll(m[a[i]]*m[a[j]]*m[a[k]]);

    }
  }
}


cout<<count<<endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:5:12: error: expected primary-expression before 'long'
    5 | #define ll long long int
      |            ^~~~
a.cc:22:8: note: in expansion of macro 'll'
   22 | count+=ll(m[a[i]]*m[a[j]]*m[a[k]]);
      |        ^~
Language: C++

#define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;
#define rep(N) for (int i = 0; i < N; i++)

long get_factorial(long n){
    long result = 1;
    for (long i = 2; i <= n; i++){
        result *= i;
    }
    return result;
}

long get_combination(long n, long r){
    return get_factorial(n) / (get_factorial(n-r) * get_factorial(r));
}

long solve(vector<int> count){
    long result = 0;
    long char_count, elem_combination;
    bitset<5> combination;
    for (long i = 0; i < (1 << 5); i++){
        char_count = 0;
        elem_combination = 1;
        combination = i;
        for (long j = 0; j < 5; j++){
            if (combination[j] == 1){
                char_count++;
                elem_combination *= count[j];
            }
        }
        if (char_count == 3){
            result += elem_combination;
        }
    }
    return result;
}

int main(){
    long N;
    cin >> N;
    string str;
    vector<long> count(5, 0);
    long answer;
    for (long i = 0; i < N; i++){
        cin >> str;
        switch (str[0]){
            case 'M':
                count[0]++;
                break;
            case 'A':
                count[1]++;
                break;
            case 'R':
                count[2]++;
                break;
            case 'C':
                count[3]++;
                break;
            case 'H':
                count[4]++;
                break;
        }
    }

    answer = solve(count);
    cout << answer << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:66:20: error: could not convert 'count' from 'vector<long int>' to 'vector<int>'
   66 |     answer = solve(count);
      |                    ^~~~~
      |                    |
      |                    vector<long int>
Language: C++

#include<bits/stdc++.h>
#define all(x) (x).begin(),(x).end()
#define rep(i,n) for(ll i=0;i<(ll)(n);i++)
using namespace std;
typedef long long ll;
ll gcd(ll a,ll b){return b!=0?gcd(b,a%b):a;}
ll lcm(ll a,ll b){return a*b/gcd(a,b);}

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

Compiler output:
a.cc: In function 'int main()':
a.cc:11:5: error: expected initializer before 'cin'
   11 |     cin>>n;
      |     ^~~
a.cc:14:11: error: 'n' was not declared in this scope
   14 |     rep(i,n){
      |           ^
a.cc:3:36: note: in definition of macro 'rep'
    3 | #define rep(i,n) for(ll i=0;i<(ll)(n);i++)
      |                                    ^