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


#include<bits/stdc++.h>
#define F first
#define S second
#define PB push_back
#define mp make_pair
#define REP(i,a,b) for(ll i=a;i<b;i++)
#define MOD 1000000007
typedef long long ll;
using namespace std;

void FAST() {
	ios::sync_with_stdio(0);
	cin.tie(0);
	cout.tie(0);
}

int main(){
	

	ll n; cin>>n; ll a;

map<string,int>mp;
ll counta,countb,countc,countd;
 counta=countb=countc=countd=0;
mp.insert({"AC",counta});
mp.insert({"TLE",countb});
mp.insert({"RE",countc});
mp.insert({"WA",countd});

string s;


REP(i,0,n){
  cin>>s;
if(s=="AC"){
	counta++;
	mp[s]=counta;
}

else if(s=="TLE"){
	countb++;
	mp[s]=countb;
}

else if(s=="RE"){
	countc++;
	mp[s]=countc;
}

else if(s=="WA"){
	countd++;
	mp[s]=countd;
}

}
/*
for(auto i:mp){
	cout<<i.first<<" "<<i.second<<endl;
}*/


cout<<"AC x "<<counta<<endl<<"WA x "<<countd<<endl<<"TLE x "<<countb<<endl<<"RE x "<<countc;
	//cerr<<a<<endl;
	
	

Compiler output:
a.cc: In function 'int main()':
a.cc:63:93: error: expected '}' at end of input
   63 | cout<<"AC x "<<counta<<endl<<"WA x "<<countd<<endl<<"TLE x "<<countb<<endl<<"RE x "<<countc;
      |                                                                                             ^
a.cc:18:11: note: to match this '{'
   18 | int main(){
      |           ^
Language: C++

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

int main() {
 int N;
 string seged;
 vector <string> pls_kill_me;
 cin >> N;
 for(int i=0;i<N;i++){
  cin >> seged;
  pls_kill_me.push_back(seged);
 }
 int AC=0;
 int WA=0;
 int TLE=0;
 int RE=0;
 for(int i=0;i<N;i++){
   if(pls_kill_me[i]=="AC"){
     AC+=1;
   }else if(pls_kill_me[i]=="WA"){
   WA+=1;}
 }else if(pls_kill_me[i]=="TLE"){
   TLE+=1;
 }else if(pls_kill_me[i]=="RE"){
   RE+=1;
 }
 cout << "AC x "<<AC<<endl ;
 cout << "WA x "<<WA<<endl ;
 cout << "TLE x "<<TLE<<endl ;
 cout << "RE x "<<RE<<endl ;
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:23:3: error: 'else' without a previous 'if'
   23 |  }else if(pls_kill_me[i]=="TLE"){
      |   ^~~~
a.cc:23:23: error: 'i' was not declared in this scope
   23 |  }else if(pls_kill_me[i]=="TLE"){
      |                       ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
	int n;cin>>n;
	int i;string s;
	int cac=0,ctle=0,cwa=0,cre=0;
	for(i=0;i<n;i++)
	{
		cin>>s;
		if(s=="AC")
		cac++;
		else if(s=="WA")
		cwa++;
		else if(s=="TLE")
		ctle++;
		else
		cre++;
	}
	cout<<"AC x "<<cac<<endl;
	cout<<"WA x "<<cwa<<endl;
	cout<<"TLE x "<<ctel<<endl;
	cout<<"RE x "<<cre<<endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:25: error: 'ctel' was not declared in this scope; did you mean 'ctle'?
   22 |         cout<<"TLE x "<<ctel<<endl;
      |                         ^~~~
      |                         ctle
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
	int n;cin>>n;
	int i;string s;
	int cac=0,ctle=0,cwa=0,cre=0;
	for(i=0;i<n;i++)
	{
		cin>>s;
		if(s=="AC")
		cac++;
		else if(s=="WA")
		cwa++;
		else if(s=="TLE")
		ctel++;
		else
		cre++;
	}
	cout<<"AC x "<<cac<<endl;
	cout<<"WA x "<<cwa<<endl;
	cout<<"TLE x "<<ctel<<endl;
	cout<<"RE x "<<cre<<endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:17: error: 'ctel' was not declared in this scope; did you mean 'ctle'?
   16 |                 ctel++;
      |                 ^~~~
      |                 ctle
a.cc:22:25: error: 'ctel' was not declared in this scope; did you mean 'ctle'?
   22 |         cout<<"TLE x "<<ctel<<endl;
      |                         ^~~~
      |                         ctle
Language: C++

#include <stdio.h>
#include<iostream>
#include<string>gfjh
using namespace std;
int main() {
	int N,a=0,b=0,c=0,d=0,e=0;
	string h;
	cin >> N;
	for (int i = 0; i < N; i++) {
		cin >> h;
		if(h =="AC")
			a++;
		if (h == "WA")
			b++;
		if (h == "TLE")
			c++;
		if (h == "RE")
			d++;
	}
	cout << "AC x " <<a << endl;
	cout << "WA x " <<b << endl;
	cout << "TLE x "<< c << endl;
	cout << "RE x "<< d << endl;
	return 0;
}

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

#include<stdio.h>
int main(void){
  char k[4];
  int  i,n,t[4]={};
  char s[5][5]={"AC","WA","TLE","RE"}
  for(i=0;i<n;i++){
  scanf("%s\n",k);
  if(k[0]=='A'){
    t[0]=t[0]+1;
  }else if(k[0]=='W'){
    t[1]==t[1]+1;
  }else if(k[0]=='T'){
    t[2]=t[2]+1;
  }else if(k[0]=='R'){
    t[3]=t[3]+1;
  }
  }
  i=0;
  for(i=0;i<4;i++){
    printf("%sx%d\n",s[i],t[i]);
  }
 return 0; 
}


Compiler output:
main.c: In function 'main':
main.c:6:3: error: expected ',' or ';' before 'for'
    6 |   for(i=0;i<n;i++){
      |   ^~~
main.c:6:18: error: expected ';' before ')' token
    6 |   for(i=0;i<n;i++){
      |                  ^
      |                  ;
main.c:6:18: error: expected statement before ')' token
Language: C

#include<stdio.h>
int main(void){
  char k[4];
  int n,t[4]=0;
  char k[5][5]={}
  for(i=0;i<n;i++){
  scanf("%s\n",k);
  if(k[0]=='A'){
    t[0]=t[0]+1;
  }else if(k[0]=='W'){
    t[1]==t[1]+1;
  }else if(k[0]=='T'){
    t[2]=t[2]+1;
  }else if(k[0]=='R'){
    t[3]=t[3]+1;
  }
  }
  i=0;
  for(i=0;i<3;i++){
    printf("%sx%d\n",s[i],t[i]);
  }
 return 0; 
}

Compiler output:
main.c: In function 'main':
main.c:4:14: error: invalid initializer
    4 |   int n,t[4]=0;
      |              ^
main.c:5:8: error: conflicting types for 'k'; have 'char[5][5]'
    5 |   char k[5][5]={}
      |        ^
main.c:3:8: note: previous declaration of 'k' with type 'char[4]'
    3 |   char k[4];
      |        ^
main.c:6:3: error: expected ',' or ';' before 'for'
    6 |   for(i=0;i<n;i++){
      |   ^~~
main.c:6:11: error: 'i' undeclared (first use in this function)
    6 |   for(i=0;i<n;i++){
      |           ^
main.c:6:11: note: each undeclared identifier is reported only once for each function it appears in
main.c:6:18: error: expected ';' before ')' token
    6 |   for(i=0;i<n;i++){
      |                  ^
      |                  ;
main.c:6:18: error: expected statement before ')' token
main.c:8:10: warning: comparison between pointer and integer
    8 |   if(k[0]=='A'){
      |          ^~
main.c:10:16: warning: comparison between pointer and integer
   10 |   }else if(k[0]=='W'){
      |                ^~
main.c:12:16: warning: comparison between pointer and integer
   12 |   }else if(k[0]=='T'){
      |                ^~
main.c:14:16: warning: comparison between pointer and integer
   14 |   }else if(k[0]=='R'){
      |                ^~
main.c:20:22: error: 's' undeclared (first use in this function)
   20 |     printf("%sx%d\n",s[i],t[i]);
      |                      ^
Language: C++

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

int main()
{
int num, accounter=0,wacounter=0,tlecounter=0,recounter=0;
cin>>num;
string arr[100];
for(int i=0; i<num; i++){
    cin>>arr[i];
    if(arr[i]=="AC")
        accounter++;
   else if(arr[i]=="WA")
        wacounter++;
    else if (arr[i]=="TLE")
        tlecounter++;
    else
        recounter++;
}
cout<<"AC"<<" "<<"x"<<accounter<<endl;
cout<<"WA"<<" "<<"x"<<wacounter<<endl;
cout<<"TLE"<<" "<<"x"<<tlecounter<<endl;
cout<<"RE"<<" "<<"x"<<recounter<<endl;

    return 0;
}
#include <iostream>
#include<string>
using namespace std;

int main()
{
int num, accounter=0,wacounter=0,tlecounter=0,recounter=0;
cin>>num;
string arr[100];
for(int i=0; i<num; i++){
    cin>>arr[i];
    if(arr[i]=="AC")
        accounter++;
   else if(arr[i]=="WA")
        wacounter++;
    else if (arr[i]=="TLE")
        tlecounter++;
    else
        recounter++;
}
cout<<"AC"<<" "<<"x "<<accounter<<endl;
cout<<"WA"<<" "<<"x "<<wacounter<<endl;
cout<<"TLE"<<" "<<"x "<<tlecounter<<endl;
cout<<"RE"<<" "<<"x "<<recounter<<endl;

    return 0;
}


Compiler output:
a.cc:32:5: error: redefinition of 'int main()'
   32 | int main()
      |     ^~~~
a.cc:5:5: note: 'int main()' previously defined here
    5 | int main()
      |     ^~~~
Language: Java

import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Scanner;
import java.util.stream.IntStream;

public class Map {

	/** マップのキーの一覧 */
	private static final List<String> KEYS = Arrays.asList("AC", "WA", "TLE", "RE");

	public static void main(String[] args) {
		try (Scanner scanner = new Scanner(System.in)) {
			int n = scanner.nextInt();
			Map<String, Integer> map = new HashMap<>();
			IntStream.range(0, n).forEach(i -> {
				String s = scanner.next();
				map.put(s, map.getOrDefault(s, 0) + 1);
			});
			KEYS.stream().forEach(key -> System.out.println(key + " x " + map.getOrDefault(key, 0)));
		}
	}
}


Compiler output:
Main.java:8: error: class Map is public, should be declared in a file named Map.java
public class Map {
       ^
Main.java:4: error: Map is already defined in this compilation unit
import java.util.Map;
^
2 errors
Language: C++



#include <iostream>
using namespace std;

int main()

{
a
    int arraysize, AC_count = 0, WA_count = 0, TLE_count = 0, RE_count = 0;

    string array[100];

    cin >> arraysize;

    for (int i = 0; i < arraysize; i++)

    {

        cin >> array[i];

        if (array[i] == "AC")

            AC_count++;

        else if (array[i] == "WA")

            WA_count++;

        else if (array[i] == "TLE")

            TLE_count++;

        else if (array[i] == "RE")

            RE_count++;

    }

    cout << "AC X " << AC_count << endl << "WA X " << WA_count << endl << "TLE X " << TLE_count << endl << "RE X " << RE_count << endl;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:1: error: 'a' was not declared in this scope
    9 | a
      | ^
a.cc:14:12: error: 'arraysize' was not declared in this scope
   14 |     cin >> arraysize;
      |            ^~~~~~~~~
a.cc:24:13: error: 'AC_count' was not declared in this scope
   24 |             AC_count++;
      |             ^~~~~~~~
a.cc:28:13: error: 'WA_count' was not declared in this scope
   28 |             WA_count++;
      |             ^~~~~~~~
a.cc:32:13: error: 'TLE_count' was not declared in this scope
   32 |             TLE_count++;
      |             ^~~~~~~~~
a.cc:36:13: error: 'RE_count' was not declared in this scope
   36 |             RE_count++;
      |             ^~~~~~~~
a.cc:40:24: error: 'AC_count' was not declared in this scope
   40 |     cout << "AC X " << AC_count << endl << "WA X " << WA_count << endl << "TLE X " << TLE_count << endl << "RE X " << RE_count << endl;
      |                        ^~~~~~~~
a.cc:40:55: error: 'WA_count' was not declared in this scope
   40 |     cout << "AC X " << AC_count << endl << "WA X " << WA_count << endl << "TLE X " << TLE_count << endl << "RE X " << RE_count << endl;
      |                                                       ^~~~~~~~
a.cc:40:87: error: 'TLE_count' was not declared in this scope
   40 |     cout << "AC X " << AC_count << endl << "WA X " << WA_count << endl << "TLE X " << TLE_count << endl << "RE X " << RE_count << endl;
      |                                                                                       ^~~~~~~~~
a.cc:40:119: error: 'RE_count' was not declared in this scope
   40 |     cout << "AC X " << AC_count << endl << "WA X " << WA_count << endl << "TLE X " << TLE_count << endl << "RE X " << RE_count << endl;
      |                                                                                                                       ^~~~~~~~
Language: C++

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

int main()
{
  int N ;
  cin >> N ;
  string str[i] ;
  for(int i = 0;i < N;i++)
  {
    cin >> str[N];
  }
  int AC = 0;
  int WA = 0;
  int TLE = 0;
  int RE = 0;
  for(int i = 0;i < N;i++)
  {
    if(str[i] == "AC" )
    {
      AC++;
    }
    if(str[i] == "WA" )
    {
      WA++;
    }
     if(str[i] == "TLE" )
    {
      TLE++;
    }
       if(str[i] == "RE" )
    {
      RE++;
    }
  }
  cout << "AC x " << AC << endl;
  cout << "WA x " << WA << endl;
  cout << "TLE x " << TLE << endl;
  cout << "RE x " << RE << endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:14: error: 'i' was not declared in this scope
    9 |   string str[i] ;
      |              ^
a.cc:12:12: error: 'str' was not declared in this scope; did you mean 'std'?
   12 |     cin >> str[N];
      |            ^~~
      |            std
a.cc:20:8: error: 'str' was not declared in this scope; did you mean 'std'?
   20 |     if(str[i] == "AC" )
      |        ^~~
      |        std
a.cc:24:8: error: 'str' was not declared in this scope; did you mean 'std'?
   24 |     if(str[i] == "WA" )
      |        ^~~
      |        std
a.cc:28:9: error: 'str' was not declared in this scope; did you mean 'std'?
   28 |      if(str[i] == "TLE" )
      |         ^~~
      |         std
a.cc:32:11: error: 'str' was not declared in this scope; did you mean 'std'?
   32 |        if(str[i] == "RE" )
      |           ^~~
      |           std
Language: Java

import java.util.Scanner;
public class Main{
  public static void main(String[] args){
    Scanner scan = new Scanner(System.in);
    n = scan.nextInt();
    int c0 = 0;
    int c1 = 0;
    int c2 = 0;
    int c3 = 0;
    for (int i = 0; i < n; i++){
      string S = scan.next();
      if (S == "AC"){
        c0++;
      }else if (S == "WA"){
        c1++;
      }else if (S == "TLE"){
        c2++;
      }else if (S == "RE"){
        c3++;
      }
    }
  System.out.println("AC"+" "+"x"+" "+c0);
  System.out.println("WA"+" "+"x"+" "+c1);
  System.out.println("TLE"+" "+"x"+" "+c2);
  System.out.println("RE"+" "+"x"+" "+c3);
  }
}

Compiler output:
Main.java:5: error: cannot find symbol
    n = scan.nextInt();
    ^
  symbol:   variable n
  location: class Main
Main.java:10: error: cannot find symbol
    for (int i = 0; i < n; i++){
                        ^
  symbol:   variable n
  location: class Main
Main.java:11: error: cannot find symbol
      string S = scan.next();
      ^
  symbol:   class string
  location: class Main
3 errors
Language: Java

import java.util.Scanner;
public class Main{
  public static void main(String[] args){
    Scanner scan = new Scanner(System.in);
    n = scan.nextInt();
    int s0 = 0;
    int s1 = 0;
    int s2 = 0;
    int s3 = 0;
    for (int i = 0; i < n; i++){
      string S = scan.next();
      if (S == "AC"){
        s0++;
      }else if (S == "WA"){
        s1++;
      }else if (S == "TLE"){
        s2++;
      }else if (S == "RE"){
        s3++;
      }
    }
  System.out.println("AC"+" "+"x"+" "+c0);
  System.out.println("WA"+" "+"x"+" "+c1);
  System.out.println("TLE"+" "+"x"+" "+c2);
  System.out.println("RE"+" "+"x"+" "+c3);
  }
}


Compiler output:
Main.java:5: error: cannot find symbol
    n = scan.nextInt();
    ^
  symbol:   variable n
  location: class Main
Main.java:10: error: cannot find symbol
    for (int i = 0; i < n; i++){
                        ^
  symbol:   variable n
  location: class Main
Main.java:11: error: cannot find symbol
      string S = scan.next();
      ^
  symbol:   class string
  location: class Main
Main.java:22: error: cannot find symbol
  System.out.println("AC"+" "+"x"+" "+c0);
                                      ^
  symbol:   variable c0
  location: class Main
Main.java:23: error: cannot find symbol
  System.out.println("WA"+" "+"x"+" "+c1);
                                      ^
  symbol:   variable c1
  location: class Main
Main.java:24: error: cannot find symbol
  System.out.println("TLE"+" "+"x"+" "+c2);
                                       ^
  symbol:   variable c2
  location: class Main
Main.java:25: error: cannot find symbol
  System.out.println("RE"+" "+"x"+" "+c3);
                                      ^
  symbol:   variable c3
  location: class Main
7 errors
Language: Java

import java.util.Scanner;
public class Main{
  public static void main(String[] args){
    Scanner scan = new Scanner(System.in);
    n = scan.nextInt();
    int s0 = 0;
    int s1 = 0;
    int s2 = 0;
    int s3 = 0;
    for (i = 0; i < n; i++){
      string S = scan.next();
      if (S == "AC"){
        s0++;
      }else if (S == "WA"){
        s1++;
      }else if (S == "TLE"){
        s2++;
      }else if (S == "RE"){
        s3++;
      }
    }
  System.out.println("AC"+" "+"x"+" "+c0);
  System.out.println("WA"+" "+"x"+" "+c1);
  System.out.println("TLE"+" "+"x"+" "+c2);
  System.out.println("RE"+" "+"x"+" "+c3);
  }
}

Compiler output:
Main.java:5: error: cannot find symbol
    n = scan.nextInt();
    ^
  symbol:   variable n
  location: class Main
Main.java:10: error: cannot find symbol
    for (i = 0; i < n; i++){
         ^
  symbol:   variable i
  location: class Main
Main.java:10: error: cannot find symbol
    for (i = 0; i < n; i++){
                ^
  symbol:   variable i
  location: class Main
Main.java:10: error: cannot find symbol
    for (i = 0; i < n; i++){
                    ^
  symbol:   variable n
  location: class Main
Main.java:10: error: cannot find symbol
    for (i = 0; i < n; i++){
                       ^
  symbol:   variable i
  location: class Main
Main.java:11: error: cannot find symbol
      string S = scan.next();
      ^
  symbol:   class string
  location: class Main
Main.java:22: error: cannot find symbol
  System.out.println("AC"+" "+"x"+" "+c0);
                                      ^
  symbol:   variable c0
  location: class Main
Main.java:23: error: cannot find symbol
  System.out.println("WA"+" "+"x"+" "+c1);
                                      ^
  symbol:   variable c1
  location: class Main
Main.java:24: error: cannot find symbol
  System.out.println("TLE"+" "+"x"+" "+c2);
                                       ^
  symbol:   variable c2
  location: class Main
Main.java:25: error: cannot find symbol
  System.out.println("RE"+" "+"x"+" "+c3);
                                      ^
  symbol:   variable c3
  location: class Main
10 errors
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int n;
  cin >> n;
  int c0 = 0;
  int c1 = 0;  
  int c2 = 0;
  int c3 = 0;
  for (i = 0; i < n; i++){
    String S;
    cin >> S;
    if (S == "AC"){
      c0 += 1
    }else if (S == "WA"){
      c1 += 1
    }else if (S == "TLE"){
      c2 += 1
    }else if (S == "RE"){
      c3 += 1
    }
  }
  cout << "AC" << " " << "x" << " " << c0 << endl;
  cout << "WA" << " " << "x" << " " << c1 << endl;
  cout << "TLE" << " " << "x" << " " << c2 << endl;
  cout << "RE" << " " << "x" << " " << c3 << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:8: error: 'i' was not declared in this scope
   10 |   for (i = 0; i < n; i++){
      |        ^
a.cc:11:5: error: 'String' was not declared in this scope
   11 |     String S;
      |     ^~~~~~
a.cc:12:12: error: 'S' was not declared in this scope
   12 |     cin >> S;
      |            ^
a.cc:14:14: error: expected ';' before '}' token
   14 |       c0 += 1
      |              ^
      |              ;
   15 |     }else if (S == "WA"){
      |     ~         
a.cc:16:14: error: expected ';' before '}' token
   16 |       c1 += 1
      |              ^
      |              ;
   17 |     }else if (S == "TLE"){
      |     ~         
a.cc:18:14: error: expected ';' before '}' token
   18 |       c2 += 1
      |              ^
      |              ;
   19 |     }else if (S == "RE"){
      |     ~         
a.cc:20:14: error: expected ';' before '}' token
   20 |       c3 += 1
      |              ^
      |              ;
   21 |     }
      |     ~
Language: C++

#include <bits/stdc++.h>
using namespace std;
using ll =long long;
#define all(v) v.begin(),v.end()
 
int main() {
  ll N;
  cin>>N;
  vector<ll> vec(4);

 for(ll i=0;i<N;i++) {
string S;
   cin>>S;
   if(S=="AC") {
vec[0]++;
   }
   else if (S=="WA") {
vec[1]++;
   }
   else if(S=="TLE") {
vec[2]++;
   }
   else {
vec[3]++;
   }
 }
  
  
  cout<<"AC"<<" "<<X<<" "<<vec[0]<<endl;
   cout<<"WA"<<" "<<X<<" "<<vec[1]<<endl;
   cout<<"TLE"<<" "<< X<<" "<<vec[2]<<endl;
   cout<<"RE"<<" "<<X<<" "<<vec[3]<<endl;
}
  


Compiler output:
a.cc: In function 'int main()':
a.cc:29:20: error: 'X' was not declared in this scope
   29 |   cout<<"AC"<<" "<<X<<" "<<vec[0]<<endl;
      |                    ^
Language: C++

include <bits/stdc++.h>
using namespace std;
int main() {
   int N;
   int ac=0,wa=0,tle=0,re=0;
   cin>>N;
   string s;
   for(int i=0;i<N;i++){
     cin>>s;
     if(s=="AC"){
       ac++;
     } 
     else if(s=="WA"){
       wa++;
     }  
     else if(s=="TLE"){
       tle++;
     }
     else re++;  
   }
   cout<<"AC x"<<ac<<endl;
   cout<<"WA x"<<wa<<endl;
   cout<<"TLE x"<<tle<<endl;
   cout<<"RE x"<<re<<endl;
 
}

Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include <bits/stdc++.h>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:6:4: error: 'cin' was not declared in this scope
    6 |    cin>>N;
      |    ^~~
a.cc:7:4: error: 'string' was not declared in this scope
    7 |    string s;
      |    ^~~~~~
a.cc:9:11: error: 's' was not declared in this scope
    9 |      cin>>s;
      |           ^
a.cc:21:4: error: 'cout' was not declared in this scope
   21 |    cout<<"AC x"<<ac<<endl;
      |    ^~~~
a.cc:21:22: error: 'endl' was not declared in this scope
   21 |    cout<<"AC x"<<ac<<endl;
      |                      ^~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main() {
   int N;
   int ac=0,wa=0,tle=0,re=0;
   cin>>N;
   string s;
   for(int i=0;i<N;i++){
     cin>>s;
     if(s=="AC"){
       ac++;
     } 
     else if(s=="WA"){
       wa++;
     }  
     else if(s=="TLE"){
       tle++;
     }
     else re++;  
   }
   cout<<"AC x"ac<<endl;
   cout<<"WA x"<<wa<<endl;
   cout<<"TLE x"<<tle<<endl;
   cout<<"RE x"<<re<<endl;
 
}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:10: error: unable to find string literal operator 'operator""ac' with 'const char [5]', 'long unsigned int' arguments
   21 |    cout<<"AC x"ac<<endl;
      |          ^~~~~~~~
Language: Java

import java.util.Scanner;
 
public class Main {
   public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
     
      //全提出の個数Nを入力
      int N = sc.nextInt();
     
      //入力内容から4種類を抽出する
      for(int i=0; i<N; i++) {
       //N個分の４種類の配列を入力
       String[] S = {"AC","WA","TLE","RE"};
       //出力個数
       int[] C = {0,0,0,0};
       
       String I = sc.nextLine();
       
       if (I.equals(S[0]) {
        C[0]++;
       } else if (I.equals(S[1]) {
        C[1]++;
       } else if (I.equals(S[2]) {
        C[2]++;
       } else if (I.equals(S[3]) {
        C[3]++;
       }
      }
      for (int i=0; i<4; i++) {
        System.out.println(S[i] + "×" + C[i]);
      }
   }
}


Compiler output:
Main.java:19: error: ')' expected
       if (I.equals(S[0]) {
                         ^
Main.java:21: error: ')' expected
       } else if (I.equals(S[1]) {
                                ^
Main.java:23: error: ')' expected
       } else if (I.equals(S[2]) {
                                ^
Main.java:25: error: ')' expected
       } else if (I.equals(S[3]) {
                                ^
4 errors
Language: C

#include <iostream>
using namespace std;
int main()
{
	int n, b =0, c = 0,d = 0,e = 0;
	string a;
	cin >> n;
	for (int i = 0; i < n; i++) {
		cin >> a;
		if (a[0] == 'A')
			b++;
		else if (a[0] == 'T' )
			c++;
		else if (a[0] == 'W')
			d++;
		else {
			e++;
		}
	}cout << "AC x "<< b << endl;
	cout << "WA x " << d << endl;
	cout << "TLE x " << c << endl;
	cout << "RE x "<< e << endl;
	
	return 0;
}

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

N = int(input())
A = []
for _ in range(N):
    A.append(input())

print('AC x',A.count('AC'))
print('WA x',A.count('WA'))
print('TLE x',A.count('TLE'))
print('RE x',A.count('RE'))

Compiler output:
a.cc:6:7: warning: multi-character character constant [-Wmultichar]
    6 | print('AC x',A.count('AC'))
      |       ^~~~~~
a.cc:6:22: warning: multi-character character constant [-Wmultichar]
    6 | print('AC x',A.count('AC'))
      |                      ^~~~
a.cc:7:7: warning: multi-character character constant [-Wmultichar]
    7 | print('WA x',A.count('WA'))
      |       ^~~~~~
a.cc:7:22: warning: multi-character character constant [-Wmultichar]
    7 | print('WA x',A.count('WA'))
      |                      ^~~~
a.cc:8:7: warning: multi-character literal with 5 characters exceeds 'int' size of 4 bytes
    8 | print('TLE x',A.count('TLE'))
      |       ^~~~~~~
a.cc:8:23: warning: multi-character character constant [-Wmultichar]
    8 | print('TLE x',A.count('TLE'))
      |                       ^~~~~
a.cc:9:7: warning: multi-character character constant [-Wmultichar]
    9 | print('RE x',A.count('RE'))
      |       ^~~~~~
a.cc:9:22: warning: multi-character character constant [-Wmultichar]
    9 | print('RE x',A.count('RE'))
      |                      ^~~~
a.cc:1:1: error: 'N' does not name a type
    1 | N = int(input())
      | ^
Language: C++

#include <iostream>

using namespace std;

int main()
{
    int N , c0=0 ,c1=0, c2=0,c3=0;
    string a=AC ,b=WA ,c=TLE ;
    cin >> N ;
    string S[N] ;
    for ( int i=0 ; i<N ; i++ ){
        cin >> S[i] ;
    }
    for (int j=0 ; j< N ;j++){
        if (a==S[j])
            c0=c0+1 ;
        else if (b==S[j])
             c1=c1+1 ;
        else if (c == S[j])
            c2=c2+1 ;
        else
            c3=c3+1 ;

    }
   cout << "AC" << ' '<< "x"<< endl ;
   cout << "WA" << ' '<< "x"<< endl ;
   cout << "TLE" << ' '<< "x"<< endl ;
   cout << "RE" << ' '<< "x"<< endl ;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:14: error: 'AC' was not declared in this scope
    8 |     string a=AC ,b=WA ,c=TLE ;
      |              ^~
a.cc:17:18: error: 'b' was not declared in this scope
   17 |         else if (b==S[j])
      |                  ^
a.cc:19:18: error: 'c' was not declared in this scope
   19 |         else if (c == S[j])
      |                  ^
Language: C++

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

void main() {
	int ac = 0;
	int wa = 0;
	int tle = 0;
	int re = 0;
	int num = 0;
	string value;
	cin >> num;
	for (int i = 0; i < num; i++) {
		cin >> value;
		if (value == "AC") {
			ac++;
		}
		else if (value == "TLE") {
			tle++;
		}
		else if (value == "WA") {
			wa++;
		}
		else if (value == "RE") {
			re++;
		}
	}
	cout << "AC x " << ac << endl;
	cout << "WA x " << wa << endl;
	cout << "TLE x " << tle << endl;
	cout << "RE x " << re << endl;

}

Compiler output:
a.cc:5:1: error: '::main' must return 'int'
    5 | void main() {
      | ^~~~
Language: Java

import java.util.Scanner;

public class Ahmed
{

    public static void main(String[] args)
    {
        Scanner read=new Scanner(System.in);
        int a=0 , w =0 , r=0 , t=0;
        int n =read.nextInt();
        read.nextLine();

        for (int i=1 ; i<=n ; i++)
        {
            String s=read.nextLine();
            if (s =="AC ")
            {
                a=a+1;
            }
            else if (s=="WA")
            {
                w=w+1;
            }
            else if (s=="TLE")
            {
                t=t+1;
            }
            else if (s=="RE")
            {
                r=r+1;
            }
        }
        System.out.print("AC x " +a);
        System.out.println("WA x "+ w );
        System.out.println("TLE x "+t);
        System.out.println("RE x "+r);
    }

}

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

#include <iostream>
#include <vector>

using namespace std;

int main() {
  vector<int> nums(4, 0);
  int n; cin >> n;
  for (int i = 0; i < n; i++) {
    string s; cin >> s;
    if (s == "AC") num[0]++;
    if (s == "WA") num[1]++;
    if (s == "TLE") num[2]++;
    if (s == "RE") num[3]++;
  }
  cout << "AC x " << num[0] << endl;
  cout << "WA x " << num[1] << endl;
  cout << "TLE x " << num[2] << endl;
  cout << "RE x " << num[3] << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:20: error: 'num' was not declared in this scope; did you mean 'nums'?
   11 |     if (s == "AC") num[0]++;
      |                    ^~~
      |                    nums
a.cc:12:20: error: 'num' was not declared in this scope; did you mean 'nums'?
   12 |     if (s == "WA") num[1]++;
      |                    ^~~
      |                    nums
a.cc:13:21: error: 'num' was not declared in this scope; did you mean 'nums'?
   13 |     if (s == "TLE") num[2]++;
      |                     ^~~
      |                     nums
a.cc:14:20: error: 'num' was not declared in this scope; did you mean 'nums'?
   14 |     if (s == "RE") num[3]++;
      |                    ^~~
      |                    nums
a.cc:16:22: error: 'num' was not declared in this scope; did you mean 'nums'?
   16 |   cout << "AC x " << num[0] << endl;
      |                      ^~~
      |                      nums
Language: C

#include <stdio.h>
#include <string.h>
int main(void)
{
int n,a=0,b=0,c=0,d=0,i;
char s;
char *s1 = "AC";
char *s2 = "WA";
char *s3 = "TLE";
char *s4 = "RE;
scanf("%d",&n);
for(i=1;i<=n;i++){
  scanf("%s",&s);
  if(strcmp(s1,s) == 0)
    a++;
  else if(strcmp(s2,s) == 0)
    b++;
  else if(strcmp(s3,s) == 0)
    c++;
  else if(strcmp(s4,s) == 0)
    d++;
}
  printf("AC * %d",a);
  printf("WA * %d",b);
  printf("TLE * %d",c);
  printf("RE * %d",d);
  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:10:12: warning: missing terminating " character
   10 | char *s4 = "RE;
      |            ^
main.c:10:12: error: missing terminating " character
   10 | char *s4 = "RE;
      |            ^~~~
main.c:11:1: error: initialization of 'char *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
   11 | scanf("%d",&n);
      | ^~~~~
main.c:14:16: error: passing argument 2 of 'strcmp' makes pointer from integer without a cast [-Wint-conversion]
   14 |   if(strcmp(s1,s) == 0)
      |                ^
      |                |
      |                char
In file included from main.c:2:
/usr/include/string.h:156:50: note: expected 'const char *' but argument is of type 'char'
  156 | extern int strcmp (const char *__s1, const char *__s2)
      |                                      ~~~~~~~~~~~~^~~~
main.c:16:21: error: passing argument 2 of 'strcmp' makes pointer from integer without a cast [-Wint-conversion]
   16 |   else if(strcmp(s2,s) == 0)
      |                     ^
      |                     |
      |                     char
/usr/include/string.h:156:50: note: expected 'const char *' but argument is of type 'char'
  156 | extern int strcmp (const char *__s1, const char *__s2)
      |                                      ~~~~~~~~~~~~^~~~
main.c:18:21: error: passing argument 2 of 'strcmp' makes pointer from integer without a cast [-Wint-conversion]
   18 |   else if(strcmp(s3,s) == 0)
      |                     ^
      |                     |
      |                     char
/usr/include/string.h:156:50: note: expected 'const char *' but argument is of type 'char'
  156 | extern int strcmp (const char *__s1, const char *__s2)
      |                                      ~~~~~~~~~~~~^~~~
main.c:20:21: error: passing argument 2 of 'strcmp' makes pointer from integer without a cast [-Wint-conversion]
   20 |   else if(strcmp(s4,s) == 0)
      |                     ^
      |                     |
      |                     char
/usr/include/string.h:156:50: note: expected 'const char *' but argument is of type 'char'
  156 | extern int strcmp (const char *__s1, const char *__s2)
      |                                      ~~~~~~~~~~~~^~~~
Language: C

#include <stdio.h>
#include <string.h>
int main(void)
{
int n,a=0,b=0,c=0,d=0,i;
char s;
char *s1 = "AC";
char *s2 = "WA";
char *s3 = "TLE";
char *s4 = "RE;
scanf("%d",&n);
for(i=1;i<=n;i++){
  scanf("%c",&s);
  if(strcmp(s1,s) == 0)
    a++;
  else if(strcmp(s2,s) == 0)
    b++;
  else if(strcmp(s3,s) == 0)
    c++;
  else if(strcmp(s4,s) == 0)
    d++;
}
  printf("AC * %d",a);
  printf("WA * %d",b);
  printf("TLE * %d",c);
  printf("RE * %d",d);
  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:10:12: warning: missing terminating " character
   10 | char *s4 = "RE;
      |            ^
main.c:10:12: error: missing terminating " character
   10 | char *s4 = "RE;
      |            ^~~~
main.c:11:1: error: initialization of 'char *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
   11 | scanf("%d",&n);
      | ^~~~~
main.c:14:16: error: passing argument 2 of 'strcmp' makes pointer from integer without a cast [-Wint-conversion]
   14 |   if(strcmp(s1,s) == 0)
      |                ^
      |                |
      |                char
In file included from main.c:2:
/usr/include/string.h:156:50: note: expected 'const char *' but argument is of type 'char'
  156 | extern int strcmp (const char *__s1, const char *__s2)
      |                                      ~~~~~~~~~~~~^~~~
main.c:16:21: error: passing argument 2 of 'strcmp' makes pointer from integer without a cast [-Wint-conversion]
   16 |   else if(strcmp(s2,s) == 0)
      |                     ^
      |                     |
      |                     char
/usr/include/string.h:156:50: note: expected 'const char *' but argument is of type 'char'
  156 | extern int strcmp (const char *__s1, const char *__s2)
      |                                      ~~~~~~~~~~~~^~~~
main.c:18:21: error: passing argument 2 of 'strcmp' makes pointer from integer without a cast [-Wint-conversion]
   18 |   else if(strcmp(s3,s) == 0)
      |                     ^
      |                     |
      |                     char
/usr/include/string.h:156:50: note: expected 'const char *' but argument is of type 'char'
  156 | extern int strcmp (const char *__s1, const char *__s2)
      |                                      ~~~~~~~~~~~~^~~~
main.c:20:21: error: passing argument 2 of 'strcmp' makes pointer from integer without a cast [-Wint-conversion]
   20 |   else if(strcmp(s4,s) == 0)
      |                     ^
      |                     |
      |                     char
/usr/include/string.h:156:50: note: expected 'const char *' but argument is of type 'char'
  156 | extern int strcmp (const char *__s1, const char *__s2)
      |                                      ~~~~~~~~~~~~^~~~
Language: C

#include <stdio.h>
int main(void)
{
int n,i;
int a=0,b=0,d=0,e=0;
char c;
scanf("%d",&n);
  for(i=1;i<=n;i++){
    scanf("%c",&c)
 if('AC' == c)
   a++;
    else if('WA' == c)
      b++;
    else if('TLE' == c)
      d++;
    else if('RE' == c)
      e++;
  }
  printf("AC*%d",a);
  printf("WA*%d",b);
  printf("TLE*%d",d);
  printf("RE*%d",e);
  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:9:19: error: expected ';' before 'if'
    9 |     scanf("%c",&c)
      |                   ^
      |                   ;
   10 |  if('AC' == c)
      |  ~~                
main.c:10:5: warning: multi-character character constant [-Wmultichar]
   10 |  if('AC' == c)
      |     ^~~~
main.c:12:5: error: 'else' without a previous 'if'
   12 |     else if('WA' == c)
      |     ^~~~
main.c:12:13: warning: multi-character character constant [-Wmultichar]
   12 |     else if('WA' == c)
      |             ^~~~
main.c:14:13: warning: multi-character character constant [-Wmultichar]
   14 |     else if('TLE' == c)
      |             ^~~~~
main.c:16:13: warning: multi-character character constant [-Wmultichar]
   16 |     else if('RE' == c)
      |             ^~~~
Language: C

#include <stdio.h>
int main(void)
{
int n,i;
int a=0,b=0,d=0,e=0;
char c,s[4] = {'AC','WA','TLE','RE'};
scanf("%d",&n);
  for(i=1;i<=n;i++){
    scanf("%c",&c)
 if(s[0] == c)
   a++;
    else if(s[1] == c)
      b++;
    else if(s[2] == c)
      d++;
    else
      e++;
  }
  printf("AC*%d",a);
  printf("WA*%d",b);
  printf("TLE*%d",d);
  printf("RE*%d",e);
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:16: warning: multi-character character constant [-Wmultichar]
    6 | char c,s[4] = {'AC','WA','TLE','RE'};
      |                ^~~~
main.c:6:16: warning: overflow in conversion from 'int' to 'char' changes value from '16707' to '67' [-Woverflow]
main.c:6:21: warning: multi-character character constant [-Wmultichar]
    6 | char c,s[4] = {'AC','WA','TLE','RE'};
      |                     ^~~~
main.c:6:21: warning: overflow in conversion from 'int' to 'char' changes value from '22337' to '65' [-Woverflow]
main.c:6:26: warning: multi-character character constant [-Wmultichar]
    6 | char c,s[4] = {'AC','WA','TLE','RE'};
      |                          ^~~~~
main.c:6:26: warning: overflow in conversion from 'int' to 'char' changes value from '5524549' to '69' [-Woverflow]
main.c:6:32: warning: multi-character character constant [-Wmultichar]
    6 | char c,s[4] = {'AC','WA','TLE','RE'};
      |                                ^~~~
main.c:6:32: warning: overflow in conversion from 'int' to 'char' changes value from '21061' to '69' [-Woverflow]
main.c:9:19: error: expected ';' before 'if'
    9 |     scanf("%c",&c)
      |                   ^
      |                   ;
   10 |  if(s[0] == c)
      |  ~~                
main.c:12:5: error: 'else' without a previous 'if'
   12 |     else if(s[1] == c)
      |     ^~~~
Language: C

#include <stdio.h>

int main(void)
{
	char* mozi;
  int N;
  int AC=0,WA=0,TLE=0,RE=0;
  for(int i=0;i<N;i++){
  	switch(scanf("%s",mozi)){
      case 'AC':
        AC++;
        break;
      case 'WA':
        WA++;
        break;
      case 'TLE':
        THL++;
        break;
      case 'RE'
    	RE++;
        break;
    }
  }
  printf("ACx%d\nWAx%d\nTHLx%d\nREx%d",AC,WA,THL,RE);
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:10:12: warning: multi-character character constant [-Wmultichar]
   10 |       case 'AC':
      |            ^~~~
main.c:13:12: warning: multi-character character constant [-Wmultichar]
   13 |       case 'WA':
      |            ^~~~
main.c:16:12: warning: multi-character character constant [-Wmultichar]
   16 |       case 'TLE':
      |            ^~~~~
main.c:17:9: error: 'THL' undeclared (first use in this function)
   17 |         THL++;
      |         ^~~
main.c:17:9: note: each undeclared identifier is reported only once for each function it appears in
main.c:19:12: warning: multi-character character constant [-Wmultichar]
   19 |       case 'RE'
      |            ^~~~
main.c:20:9: error: expected ':' or '...' before 'RE'
   20 |         RE++;
      |         ^~
Language: C

#include<stdio.h>

int main(){
  
  int i, n;
  int AC, WA, TLE, RE;
  
  char judge[100];
  char name[100] = {'AC','WA','TLE','RE'};
  
  scanf("%d" ,&n);
  
  for(i = 0; i < n; i++){
    
    scanf("%s" ,judge[i]);
    
    if(judge[i] == name[0]){
      AC += 1;
    }else if{(judge[i] == name[1]){
      WA += 1;
    }else if{(judge[i] == name[2]){
      TLE += 1;
    }else if{(judge[i] == name[3]){
      RE += 1;
    }
            
  }
          
   printf("AC x %d\n", AC); 
   printf("WA x %d\n", WA);
   printf("TLE x %d\n", TLE); 
   printf("RE x %d\n", RE); 
             
   return 0;
             
 }

Compiler output:
main.c: In function 'main':
main.c:9:21: warning: multi-character character constant [-Wmultichar]
    9 |   char name[100] = {'AC','WA','TLE','RE'};
      |                     ^~~~
main.c:9:21: warning: overflow in conversion from 'int' to 'char' changes value from '16707' to '67' [-Woverflow]
main.c:9:26: warning: multi-character character constant [-Wmultichar]
    9 |   char name[100] = {'AC','WA','TLE','RE'};
      |                          ^~~~
main.c:9:26: warning: overflow in conversion from 'int' to 'char' changes value from '22337' to '65' [-Woverflow]
main.c:9:31: warning: multi-character character constant [-Wmultichar]
    9 |   char name[100] = {'AC','WA','TLE','RE'};
      |                               ^~~~~
main.c:9:31: warning: overflow in conversion from 'int' to 'char' changes value from '5524549' to '69' [-Woverflow]
main.c:9:37: warning: multi-character character constant [-Wmultichar]
    9 |   char name[100] = {'AC','WA','TLE','RE'};
      |                                     ^~~~
main.c:9:37: warning: overflow in conversion from 'int' to 'char' changes value from '21061' to '69' [-Woverflow]
main.c:19:13: error: expected '(' before '{' token
   19 |     }else if{(judge[i] == name[1]){
      |             ^
      |             (
main.c:19:35: error: expected ';' before '{' token
   19 |     }else if{(judge[i] == name[1]){
      |                                   ^
      |                                   ;
main.c:36:2: error: expected declaration or statement at end of input
   36 |  }
      |  ^
main.c:36:2: error: expected declaration or statement at end of input
main.c:36:2: error: expected declaration or statement at end of input
Language: C

#include<stdil.h>

int main(){
  
  int i, n;
  int AC, WA, TLE, RE;
  
  char judge[100];
  char name[100] = {'AC','WA','TLE','RE'};
  
  scanf("%d" ,&n);
  
  for(i = 0; i < n; i++){
    
    scanf("%s" ,judge[i]);
    
    if(judge[i] == name[0]){
      AC += 1;
    }else if{(judge[i] == name[1]){
      WA += 1;
    }else if{(judge[i] == name[2]){
      TLE += 1;
    }else if{(judge[i] == name[3]){
      RE += 1;
    }
            
  }
          
   printf("AC x %d\n", AC); 
   printf("WA x %d\n", WA);
   printf("TLE x %d\n", TLE); 
   printf("RE x %d\n", RE); 
             
   return 0;
             
 }

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

#include<bits/stdc++.h>
using namespace std;
int main()
{
  int n;
  cin>>n;
  string m[n];
  for(int i=0; i<n; i++)
  {
    cin>>m[n];
  }
  
  int a=0, b=0, c=0, d=0;
  
  for(int i=0; i<n; i++)
  {
    if(m[i]=="AC")
    {a++;}
    else if(m[i]=="WE")
    {b++;
    }
    
    else if(m[i]=="TLE")
    {c++;}
    
    else(m[i]=="RE")
    {d++;}
    
  }
  cout<<"AC x "<<a<<"/n";
  cout<<"WE x "<<b<<"/n";
  cout<<"TLE x "<<c<<"/n";
  cout<<"RE x "<<d<<"/n";
 
  return 0;
}
  
#include<bits/stdc++.h>
using namespace std;

Compiler output:
a.cc: In function 'int main()':
a.cc:26:21: error: expected ';' before '{' token
   26 |     else(m[i]=="RE")
      |                     ^
      |                     ;
   27 |     {d++;}
      |     ~                
a.cc:26:14: warning: ignoring return value of 'bool std::operator==(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const _CharT*) [with _CharT = char; _Traits = char_traits<char>; _Alloc = allocator<char>]', declared with attribute 'nodiscard' [-Wunused-result]
   26 |     else(m[i]=="RE")
      |         ~~~~~^~~~~~~
In file included from /usr/include/c++/14/string:54,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
                 from a.cc:1:
/usr/include/c++/14/bits/basic_string.h:3772:5: note: declared here
 3772 |     operator==(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
      |     ^~~~~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
  int n;
  cin>>n;
  char m[n];
  for(int i=0; i<n; i++)
  {
    cin>>m[n];
  }
  
  int a=0, b=0, c=0, d=0;
  
  for(int i=0; i<n; i++)
  {
    if(m[i]=="AC")
    {a++;}
    else if(m[i]=="WE")
    {b++;
    }
    
    else if(m[i]=="TLE")
    {c++;}
    
    else(m[i]=="RE")
    {d++;}
    
  }
  cout<<"AC x "<<a<<"/n";
  cout<<"WE x "<<b<<"/n";
  cout<<"TLE x "<<c<<"/n";
  cout<<"RE x "<<d<<"/n";

  return 0;
}
  

Compiler output:
a.cc: In function 'int main()':
a.cc:17:12: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   17 |     if(m[i]=="AC")
      |        ~~~~^~~~~~
a.cc:19:17: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   19 |     else if(m[i]=="WE")
      |             ~~~~^~~~~~
a.cc:23:17: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   23 |     else if(m[i]=="TLE")
      |             ~~~~^~~~~~~
a.cc:26:14: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   26 |     else(m[i]=="RE")
      |          ~~~~^~~~~~
a.cc:26:21: error: expected ';' before '{' token
   26 |     else(m[i]=="RE")
      |                     ^
      |                     ;
   27 |     {d++;}
      |     ~
Language: C++

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

int main() {
  int N;
  cin >> N;
  vector<str> result;
  for (int i=0; i<N; i++){
      cin >> result.at(i);
  }
  int a=0,b=0,c=0,d=0;
  for (int i=0; i<N; i++){
      if (result.at(i)=="AC"){
          a++;
      }
      else if(result.at(i)=="WA"){
          b++;
      }
      else if(result.at(i)=="TLE"){
          c++;
      }
      else{
          d++;
      }
  }
  cout<<"AC x "<<a<<endl;<<"WA x "<<b<<endl;<<"TLE x "<<c<<endl;<<"RE x "<<d<<endl;
  }


Compiler output:
a.cc: In function 'int main()':
a.cc:7:10: error: 'str' was not declared in this scope; did you mean 'std'?
    7 |   vector<str> result;
      |          ^~~
      |          std
a.cc:7:13: error: template argument 1 is invalid
    7 |   vector<str> result;
      |             ^
a.cc:7:13: error: template argument 2 is invalid
a.cc:9:21: error: request for member 'at' in 'result', which is of non-class type 'int'
    9 |       cin >> result.at(i);
      |                     ^~
a.cc:13:18: error: request for member 'at' in 'result', which is of non-class type 'int'
   13 |       if (result.at(i)=="AC"){
      |                  ^~
a.cc:16:22: error: request for member 'at' in 'result', which is of non-class type 'int'
   16 |       else if(result.at(i)=="WA"){
      |                      ^~
a.cc:19:22: error: request for member 'at' in 'result', which is of non-class type 'int'
   19 |       else if(result.at(i)=="TLE"){
      |                      ^~
a.cc:26:26: error: expected primary-expression before '<<' token
   26 |   cout<<"AC x "<<a<<endl;<<"WA x "<<b<<endl;<<"TLE x "<<c<<endl;<<"RE x "<<d<<endl;
      |                          ^~
a.cc:26:45: error: expected primary-expression before '<<' token
   26 |   cout<<"AC x "<<a<<endl;<<"WA x "<<b<<endl;<<"TLE x "<<c<<endl;<<"RE x "<<d<<endl;
      |                                             ^~
a.cc:26:65: error: expected primary-expression before '<<' token
   26 |   cout<<"AC x "<<a<<endl;<<"WA x "<<b<<endl;<<"TLE x "<<c<<endl;<<"RE x "<<d<<endl;
      |                                                                 ^~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int n;
  vector<int> v(4, 0);
  for(int i=0; i<n; i++){
    string s;
    cin>>s;
    if(s=="AC")
      	v[0]++;
    else if(s=="WA")
      v[1]++;
    eles if(s=="TLE")
      v[2]++;
    else if(s=="RE")
      v[3]++;
  }
  cout<<"AC x "<<v[0]<<endl;
  cout<<"WA x "<<v[1]<<endl;
  cout<<"TLE x "<<v[2]<<endl;
  cout<<"RE x "<<v[3]<<endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:5: error: 'eles' was not declared in this scope
   13 |     eles if(s=="TLE")
      |     ^~~~
a.cc:15:5: error: 'else' without a previous 'if'
   15 |     else if(s=="RE")
      |     ^~~~
Language: C

#include<stdio.h>
#include<string.h>
int main()
{
  long n,ac=0,wa=0,tle=0,re=0;
  scanf("%ld",&n);
  char r[5];
  for(int i==0;i<n;i++)
  {
    scanf("%s",r);
    if(strcmp(r,"AC")==0)
    {
      ++ac;
    }
    if(strcmp(r,"wa")==0)
    {
      ++wa;
    }
    if(strcmp(r,"tle")==0)
    {
      ++tle;
    }
    if(strcmp(r,"re")==0)
    {
      ++re;
    }
  }
  printf("AC x %d\nWA x %d\nTLE x %d\nRE x %d\n",ac,wa,tle,re);
}
    

Compiler output:
main.c: In function 'main':
main.c:8:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before '==' token
    8 |   for(int i==0;i<n;i++)
      |            ^~
main.c:8:16: error: 'i' undeclared (first use in this function)
    8 |   for(int i==0;i<n;i++)
      |                ^
main.c:8:16: note: each undeclared identifier is reported only once for each function it appears in
main.c:8:19: error: expected ')' before ';' token
    8 |   for(int i==0;i<n;i++)
      |      ~            ^
      |                   )