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

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

int main() {
  int N;
  int ac=0;
  int wa=0;
  int tle=0;
  int re=0;
  string s;
  cin >> N;
  for(int i=0; i<N; i++){
    cin >> s;
    if(s=="AC")
      ac++;
    if(s=="WA")
      wa++;
    if(s=="TLE")
      tle++;
    if(s=="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: In function 'int main()':
a.cc:26:2: error: expected '}' at end of input
   26 | }
      |  ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: C++


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

    int main() {
        
        long long int n;
        cin >> n;
        
        string s;
        long long int ct=0,st=0,at=0,rt=0;
        
       while(n--){
            cin>> s;
        
            if(s=="AC")
                ct++;
                
           else if(s=="WA")
                st++;
            
           else if(s=="TLE")
                at++;
           else if(s=="RE")
                rt++;
                
        
        }
        
        cout << "AC x " << ct;
        cout<< "WA x "<< st;
        cout << "TLE x "<<at
        cout << "RE x "<<rt;
        
       return 0; 
        
        }

Compiler output:
a.cc: In function 'int main()':
a.cc:32:29: error: expected ';' before 'cout'
   32 |         cout << "TLE x "<<at
      |                             ^
      |                             ;
   33 |         cout << "RE x "<<rt;
      |         ~~~~
Language: Java

import java.util.*;
public class Atcoder2{
    public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int ac=0,wa=0,tle=0,re=0;
		for (int i = 0; i < n; ++i) {
			String s = sc.next();
			if (s.equals("AC")) {++ac;}
			if (s.equals("WA")) {++wa;}
			if (s.equals("TLE")) {++tle;}
			if (s.equals("RE")) {++re;}
		}
		System.out.println("AC × " + ac);
		System.out.println("WA × " + wa);
		System.out.println("TLE × " + tle);
		System.out.println("RE × " + re);
	}
}

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

#include <bits/stdc++.h>
using namespace std;
#define input(d) cin >> d
#define inputs(n,d) for(auto i=0;i<n;i++)cin >> d[i]
#define output(d) cout << d << endl
#define outputs(n,d) for(auto i=0;i<n;i++)cout<<d[i]<<endl
typedef f0(n) for(auto i=0;i<n;i++)
typedef f(a,b) for(auto i=a;i<b;i++)

int main(){
  long n,d[4]={0,0,0,0};
  string s;
  input(n);
  f0(n){
    input(s);
    switch(s){
      case "AC": d[0]++;
      case "WA": d[1]++;
      case "TLE": d[2]++;
      case "RE": d[3]++;
    }
  }
  cout << "AC x "<<d[0]<<"WA x "<<d[1]<<"TLE x "<<d[2]<<"RE x "<<d[3]<<endl;
}

Compiler output:
a.cc:7:9: error: ISO C++ forbids declaration of 'f0' with no type [-fpermissive]
    7 | typedef f0(n) for(auto i=0;i<n;i++)
      |         ^~
a.cc:7:9: error: typedef 'f0' is initialized (use 'decltype' instead)
a.cc:7:12: error: 'n' was not declared in this scope; did you mean 'yn'?
    7 | typedef f0(n) for(auto i=0;i<n;i++)
      |            ^
      |            yn
a.cc:7:28: error: 'i' does not name a type
    7 | typedef f0(n) for(auto i=0;i<n;i++)
      |                            ^
a.cc:7:32: error: 'i' does not name a type
    7 | typedef f0(n) for(auto i=0;i<n;i++)
      |                                ^
a.cc:8:29: error: 'i' does not name a type
    8 | typedef f(a,b) for(auto i=a;i<b;i++)
      |                             ^
a.cc:8:33: error: 'i' does not name a type
    8 | typedef f(a,b) for(auto i=a;i<b;i++)
      |                                 ^
Language: C++

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

int main() {
  int A = 0,W = 0,T =0,R = 0,N;
  cin >> N;
  vector<string>s(N);
  for(int i = 0;i < N;i++)cin >> s[i];
  for(int i = 0;i < N;i++){
    if(s[i] == "AC")A++;
    else if(s[i] == "WA")W++;
    else if(s[i] == "TLE")T++;
    else R++;
  }
  cout << "AC x " << A <<endl;
  cout << "WA x " << W <<endl;
  cout << "TLE x " << T <<endl;
  cout << "RE x " << R <<endl;


Compiler output:
a.cc: In function 'int main()':
a.cc:18:31: error: expected '}' at end of input
   18 |   cout << "RE x " << R <<endl;
      |                               ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: C++

#include <stdio.h>

int main() {
  int n, verdict[4] = {0}; // AC, WA, TLE, RE
  scanf("%d", &N);

  for(int i = 0; i < n; i++) {
    char str[5];
    scanf("%s", str);
    switch(str[0]) {
      case 'A':
        verdict[0]++;
        break;
      case 'W':
        verdict[1]++;
        break;
      case 'T':
        verdict[2]++;
        break;
      case 'R':
        verdict[3]++;
        break;
    }
  }

  printf("AC x %d\n", verdict[0]);
  printf("WA x %d\n", verdict[1]);
  printf("TLE x %d\n", verdict[2]);
  printf("RE x %d\n", verdict[3]);
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:16: error: 'N' was not declared in this scope
    5 |   scanf("%d", &N);
      |                ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
  int a[4]={0};
  string s[4]={"AC","WA","TLE","RE"};
  int n;
  cin>>n;
  for(int i=0;i<n;i++)
  {
    string t;
    cin>>t;
    for(int j=0;j<4;j++)
    {
      if(t==s[j]) a[j]++;
    }
  }
  cout<<"AC X "<<a[0]<<"\n";
  cout<<"WA X "<<a[1]<<"\n";
  cout<<"TLE X "<<a[2]<<"\n";
  c

Compiler output:
a.cc: In function 'int main()':
a.cc:21:3: error: 'c' was not declared in this scope
   21 |   c
      |   ^
a.cc:21:4: error: expected '}' at end of input
   21 |   c
      |    ^
a.cc:4:1: note: to match this '{'
    4 | {
      | ^
Language: C++

#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
int main(){
   
    int n;
   cin >> n;
   string s;
   int a,b,c,d=0;

    rep(i,n){
        cin >> s;
        if(s[0]=='A') a++;
        else if (s[0]=='W') b++;
        else if (s[0]=='T') c++;
        else  d++;
    }

    cout<<"AC x "<<a<<endl<<"WA x "<<w<<endl<<"TLE x "<<t<<endl<<"RE x "<<r<<endl;
 return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:38: error: 'w' was not declared in this scope
   21 |     cout<<"AC x "<<a<<endl<<"WA x "<<w<<endl<<"TLE x "<<t<<endl<<"RE x "<<r<<endl;
      |                                      ^
a.cc:21:57: error: 't' was not declared in this scope
   21 |     cout<<"AC x "<<a<<endl<<"WA x "<<w<<endl<<"TLE x "<<t<<endl<<"RE x "<<r<<endl;
      |                                                         ^
a.cc:21:75: error: 'r' was not declared in this scope
   21 |     cout<<"AC x "<<a<<endl<<"WA x "<<w<<endl<<"TLE x "<<t<<endl<<"RE x "<<r<<endl;
      |                                                                           ^
Language: C++

include<stdio.h>
int main(){
	int AC=0;
	int WA=0;
	int TLE=0;
	int RE=0;
	int batas;
	scanf("%d", &batas);
	for(int i=0;i<batas;i++){
		char string[6]="";
		scanf("%s", &string);
		if(string[0]=='A') AC++;
		else if(string[0]=='W') WA++;
		else if(string[0]=='T') TLE++;
		else if(string[0]=='R') RE++;	
	}
	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:
a.cc:1:1: error: 'include' does not name a type
    1 | include<stdio.h>
      | ^~~~~~~
Language: C

#include <iostream>
#include <cmath>
#include <cstring>
#include <string>
using namespace std;
int main()
{
string  t[10000] , a="AC", b="WA", c="TLE", d="RE";
int N;
int ca=0 ,cb=0 ,cc=0 ,cd=0;
cin>>N;

for(int i=0;i<N;i++){
    cin>>t[i];

    if(t[i]==a){
        ca++;
    }
    else if(t[i]==b){
        cb++;
    }
    else if(t[i]==c){
        cc++;
    }
    else if(t[i]==d){
        cd++;
    }
}

cout<<a<<" x "<<ca<<endl;
cout<<b<<" x "<<cb<<endl;
cout<<c<<" x "<<cc<<endl;
cout<<d<<" x "<<cd;

    return 0;
}


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

#include <stdio.h>
#include
int main(){
	int N, AC = 0, WA = 0, TLE = 0, RE = 0;
	scanf("%d", &N);
	
	for(int i = 0; i < N; i++){
		char str[10];
		scanf("%s", str);
		
		if(strcmp(str, "AC") == 0){
			AC++;
		} else if(strcmp(str, "WA") == 0){
			WA++;
		} else if(strcmp(str, "TLE") == 0){
			TLE++;
		} else if(strcmp(str, "RE") == 0){
			RE++;
		}
	}
	
	printf("AC x %d\n", AC);
	printf("AC x %d\n", WA);
	printf("AC x %d\n", TLE);
	printf("AC x %d\n", RE);
	
	return 0;
}

Compiler output:
main.c:2:9: error: #include expects "FILENAME" or <FILENAME>
    2 | #include
      |         ^
main.c: In function 'main':
main.c:11:20: error: implicit declaration of function 'strcmp' [-Wimplicit-function-declaration]
   11 |                 if(strcmp(str, "AC") == 0){
      |                    ^~~~~~
main.c:2:1: note: include '<string.h>' or provide a declaration of 'strcmp'
    1 | #include <stdio.h>
  +++ |+#include <string.h>
    2 | #include
Language: C++

#include <stdio.h>
#include <string.h>
//subgoals
//1. scan semua input
//2. cari jumlah AC,WA,TLE,RE

int main (){
	scanf ("%d",&N)
	
	for (int i=0; i<N;i++){
	
	char str [255];
	scanf ("%s",str);
	
	if(strcmp(str"AC")==0){//"AC" - "AC"=0
		AC++;
	}else if (strcmp(str,"WA")==0){ //if str it WA
		WA++;
	}else if (strcmp(str,"TLE")==0){//if str it TLE
		TLE++;
	}else if (strcmp(str,"RE")==0){//if str it RE
 		RE++;
	}
}
	printf("ACx%d\",AC);
	printf("WAx%d\",WA);
	printf("TLEx%d\",TLE);
	printf("REx%d\",RE);
	
	return 0;
}

Compiler output:
a.cc:25:16: warning: missing terminating " character
   25 |         printf("ACx%d\",AC);
      |                ^
a.cc:25:16: error: missing terminating " character
   25 |         printf("ACx%d\",AC);
      |                ^~~~~~~~~~~~~
a.cc:26:16: warning: missing terminating " character
   26 |         printf("WAx%d\",WA);
      |                ^
a.cc:26:16: error: missing terminating " character
   26 |         printf("WAx%d\",WA);
      |                ^~~~~~~~~~~~~
a.cc:27:16: warning: missing terminating " character
   27 |         printf("TLEx%d\",TLE);
      |                ^
a.cc:27:16: error: missing terminating " character
   27 |         printf("TLEx%d\",TLE);
      |                ^~~~~~~~~~~~~~~
a.cc:28:16: warning: missing terminating " character
   28 |         printf("REx%d\",RE);
      |                ^
a.cc:28:16: error: missing terminating " character
   28 |         printf("REx%d\",RE);
      |                ^~~~~~~~~~~~~
a.cc: In function 'int main()':
a.cc:8:22: error: 'N' was not declared in this scope
    8 |         scanf ("%d",&N)
      |                      ^
a.cc:10:23: error: 'i' was not declared in this scope
   10 |         for (int i=0; i<N;i++){
      |                       ^
a.cc:30:9: error: expected primary-expression before 'return'
   30 |         return 0;
      |         ^~~~~~
Language: C++

#include <stdio.h>

int main() {
  int N;
  scanf("%d", &N);

  for(int i = 0; i < N; i++) {
    int verdict[4] = {0}; // AC, WA, TLE, RE;
    char str[5];
    scanf("%s", str);
    
    switch(str[0]) {
      case 'A':
        verdict[0]++;
        break;
      case 'W':
        verdict[1]++;
        break;
      case 'T':
        verdict[2]++;
        break;
      case 'R':
        verdict[3]++;
        break;
    }
  }

  printf("AC x %d\n", verdict[0]);
  printf("WA x %d\n", verdict[1]);
  printf("TLE x %d\n", verdict[2]);
  printf("RE x %d\n", verdict[3]);
  
  return 0;
}

// Reading Material
// https://stackoverflow.com/questions/427760/when-to-use-if-else-if-else-over-switch-statements-and-vice-versa

Compiler output:
a.cc: In function 'int main()':
a.cc:28:23: error: 'verdict' was not declared in this scope
   28 |   printf("AC x %d\n", verdict[0]);
      |                       ^~~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
 
int main() {
 int N;
 cin >> N;
 vector<string> S[i];
 int A,W,T,R;
 rep(m,N)
  cin >> S[i];
  if(S[N] == "AC"){
   A += 1;
  }else if(S[i] == "WA"){
   W += 1;
  }else if(S[i] == "TLE"){
   T += 1;
  }else if(S[i] == "RE"){
   R += 1;
 }
cout << "AC *" + A << endl;
cout << "WA *" + W << endl;
cout << "TLE *" + T << endl;
cout << "RE *" + R << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:19: error: 'i' was not declared in this scope
    8 |  vector<string> S[i];
      |                   ^
a.cc:11:10: error: 'S' was not declared in this scope
   11 |   cin >> S[i];
      |          ^
a.cc:12:6: error: 'S' was not declared in this scope
   12 |   if(S[N] == "AC"){
      |      ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
 
int main() {
 int N;
 cin >> N;
 vector<string> S(N);
 int A,W,T,R;
 rep(m,N){
  cin >> S(N);
  if(S(N) == "AC"){
   A += 1;
  }else if(S(N) == "WA"){
   W += 1;
  }else if(S(N) == "TLE"){
   T += 1;
  }else if(S(N) == "RE"){
   R += 1;
 }
cout << "AC *" + A << endl;
cout << "WA *" + W << endl;
cout << "TLE *" + T << endl;
cout << "RE *" + R << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:11: error: no match for call to '(std::vector<std::__cxx11::basic_string<char> >) (int&)'
   11 |   cin >> S(N);
      |          ~^~~
a.cc:12:7: error: no match for call to '(std::vector<std::__cxx11::basic_string<char> >) (int&)'
   12 |   if(S(N) == "AC"){
      |      ~^~~
a.cc:14:13: error: no match for call to '(std::vector<std::__cxx11::basic_string<char> >) (int&)'
   14 |   }else if(S(N) == "WA"){
      |            ~^~~
a.cc:16:13: error: no match for call to '(std::vector<std::__cxx11::basic_string<char> >) (int&)'
   16 |   }else if(S(N) == "TLE"){
      |            ~^~~
a.cc:18:13: error: no match for call to '(std::vector<std::__cxx11::basic_string<char> >) (int&)'
   18 |   }else if(S(N) == "RE"){
      |            ~^~~
a.cc:25:2: error: expected '}' at end of input
   25 | }
      |  ^
a.cc:5:12: note: to match this '{'
    5 | int main() {
      |            ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
 
int main() {
 int N;
 cin >> N;
 vector<string> S(N);
 int A,W,T,R;
 rep(m,N){
  cin >> S(N)
  if(S(N) == "AC"){
   A += 1;
  }else if(S(N) == "WA"){
   W += 1;
  }else if(S(N) == "TLE"){
   T += 1;
  }else if(S(N) == "RE"){
   R += 1;
 }
cout << "AC *" + A << endl;
cout << "WA *" + W << endl;
cout << "TLE *" + T << endl;
cout << "RE *" + R << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:11: error: no match for call to '(std::vector<std::__cxx11::basic_string<char> >) (int&)'
   11 |   cin >> S(N)
      |          ~^~~
a.cc:14:4: error: 'else' without a previous 'if'
   14 |   }else if(S(N) == "WA"){
      |    ^~~~
a.cc:14:13: error: no match for call to '(std::vector<std::__cxx11::basic_string<char> >) (int&)'
   14 |   }else if(S(N) == "WA"){
      |            ~^~~
a.cc:16:13: error: no match for call to '(std::vector<std::__cxx11::basic_string<char> >) (int&)'
   16 |   }else if(S(N) == "TLE"){
      |            ~^~~
a.cc:18:13: error: no match for call to '(std::vector<std::__cxx11::basic_string<char> >) (int&)'
   18 |   }else if(S(N) == "RE"){
      |            ~^~~
a.cc:25:2: error: expected '}' at end of input
   25 | }
      |  ^
a.cc:5:12: note: to match this '{'
    5 | int main() {
      |            ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
 
int main() {
 int N;
 vector<string> S(i);
 int A,W,T,R;
 cin >> N;
 rep(m,N){
  cin >> S(i)
  if(S(i) == "AC"){
   A += 1;
  }else if(S(i) == "WA"){
   W += 1;
  }else if(S(i) == "TLE"){
   T += 1;
  }else if(S(i) == "RE"){
   R += 1;
 }
cout << "AC *" + A << endl;
cout << "WA *" + W << endl;
cout << "TLE *" + T << endl;
cout << "RE *" + R << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:19: error: 'i' was not declared in this scope
    7 |  vector<string> S(i);
      |                   ^
a.cc:14:4: error: 'else' without a previous 'if'
   14 |   }else if(S(i) == "WA"){
      |    ^~~~
a.cc:25:2: error: expected '}' at end of input
   25 | }
      |  ^
a.cc:5:12: note: to match this '{'
    5 | int main() {
      |            ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
 
int main() {
    int N;
    cin >> N;
    vector<string> S(N);
    vector<string> J = {"AC","WA","TLE","RE"};
    vector<int> C(3);
    rep(i, N + 1){
	cin >> S(i);
	rep(m, 4){
	    if(S(i) == J(m)){
		C(m) += 1;
	    }
	}
    }
    rep(i, 4){
	cout << J(i) + "*" + C(i) << endl;
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:17: error: no match for call to '(std::vector<std::__cxx11::basic_string<char> >) (int&)'
   12 |         cin >> S(i);
      |                ~^~~
a.cc:14:17: error: no match for call to '(std::vector<std::__cxx11::basic_string<char> >) (int&)'
   14 |             if(S(i) == J(m)){
      |                ~^~~
a.cc:14:25: error: no match for call to '(std::vector<std::__cxx11::basic_string<char> >) (int&)'
   14 |             if(S(i) == J(m)){
      |                        ~^~~
a.cc:15:18: error: no match for call to '(std::vector<int>) (int&)'
   15 |                 C(m) += 1;
      |                 ~^~~
a.cc:20:18: error: no match for call to '(std::vector<std::__cxx11::basic_string<char> >) (int&)'
   20 |         cout << J(i) + "*" + C(i) << endl;
      |                 ~^~~
a.cc:20:31: error: no match for call to '(std::vector<int>) (int&)'
   20 |         cout << J(i) + "*" + C(i) << endl;
      |                              ~^~~
Language: C++

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

#define ll long long
#define For(i, a, b) for (int i = (int)(a), sz = (int)(b); i < sz; i++)
#define rFor(i, a, b) for (int i = (int)(a); i >= (int)(b); i--)
#define all(v) (v).begin(), (v).end()
#define rall(v) (v).rbegin(), (v).rend()
#define fill(a, b) memset(a, b, sizeof(a))
#define IO ios_base::sync_with_stdio(0), cin.tie(0)

const int MAX = 2e2 + 5;

int main() {
    IO;
    int n, cnt[4]{};
    string str, type[4]{"AC", "WA", "TLE", "RE"};
    cin >> n;
    For(i, 0, n) {
        cin >> str;
        For(j, 0, 4) if (str == type[j]) cnt[j]++;
    }
    For(i, 0, 4) printf("%s x %d\n", type[i].c_str(), cnt[i]);
    return 0;
}

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

#include <stdio.h>

int main (){

    int n;
    int AC=0, WA=0, TL=0, R=0;
    scanf("%d", &n);

    char str[105];

    while(n--){
        scanf("%s", &str);
        if(str[0]=='A'){
            A++;
        } else if(str[0]=='W'){
            WA++;
        } else if(str[0]=='T'){
            L++;
        } else if(str[0]=='R'){
            R++;
        }
    }
    printf("AC x %d\n", AC);
    printf("WA x %d\n", WA);
    printf("TLE x %d\n", TL);
    printf("RE x %d\n", R);



    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:13: error: 'A' was not declared in this scope
   14 |             A++;
      |             ^
a.cc:18:13: error: 'L' was not declared in this scope
   18 |             L++;
      |             ^
Language: C++

#include <stdio.h>

int main (){

    int n;
    int AC=0, WA=0, TL=0, R=0;
    scanf("%d", &n);

    char str[105];

    while(n--){
        scanf("%s", &str);
        if(str[0]=='A'){
            AC++;
        } else if(str[0]=='W'){
            WA+;
        } else if(str[0]=='T'){
            TL++;
        } else if(str[0]=='R'){
            R++;
        }
    }
    printf("AC x %d\n", AC);
    printf("WA x %d\n", WA);
    printf("TLE x %d\n", TL);
    printf("RE x %d\n", R);



    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:16: error: expected primary-expression before ';' token
   16 |             WA+;
      |                ^
Language: C++

#include <stdio.h>

int main(){
int i, j, n, sum=0, d1=0, d2=0 ;
int matrixArr[n][n];
scanf("%d", &n ) ;
for(i=0;i<n;i++)
    for(j=0;j<n;j++);
        scanf("%d", &matrixArr[i][j]);


for(i=0;i<n;i++)
    d1+=matrixArr[n][n];
    d2+=matrixArr[n][n-i-1];

sum=abs(d1-d2)
printf("%d", sum);

return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:16:5: error: 'abs' was not declared in this scope
   16 | sum=abs(d1-d2)
      |     ^~~
Language: C++

#include <stdio.h>

int main(){
int i, j, n, sum=0, d1=0, d2=0 ;
int matrixArr[n][n];
scanf("%d", &n ) ;
for(i=0;i<n;i++);{
    for(j=0;j<n;j++);
        scanf("%d", &matrixArr[i][j]);
}

for(i=0;i<n;i++)
    d1+=matrixArr[n][n];
    d2+=matrixArr[n][n-i-1];

sum=abs(d1-d2)
printf("%d", sum);

return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:16:5: error: 'abs' was not declared in this scope
   16 | sum=abs(d1-d2)
      |     ^~~
Language: C

#include <iostream>
#include <string>
using namespace std;
int main()
{
	string arr[100000];
	int countAC = 0, countTLE = 0, countWA = 0 , countRE=0;
	int num;
	cin >> num;
	for (int i = 0; i < num; i++)
	{
		cin >> arr[i];
	}
	for (int i = 0; i < num; i++)
	{
		if (arr[i] == "AC")
			countAC++;
		else if (arr[i] == "TLE")
			countTLE++;
		else if (arr[i] == "WA")
			countWA++;
		else if (arr[i] == "RE")
			countRE++;

	}
	cout << "\nAC"<<" "<<"x"<<" " << countAC;
	cout << "\nWA" << " " << "x" <<" "<< countWA;
	cout << "\nTLE"<<" "<<"x" << " " << countTLE;
	cout << "\n RE " << " " <<"x" << " " << countRE;
	return 0;
}

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

#include <stdio.h>

int main(){
int n, ac=0, wa=0, tle=0, re=0;
char stat[100];
scanf("%d", &n);
for(int i=0;i<n;i++){
    scanf("%s", stat);
    if(stat[1]=='C')
        ac++;
    else if(stat[1]=='A');
        wa++;
    else if(stat[1]=='L');
        tle++;
    else if(stat[1]=='E');
        re++;
}
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:
a.cc: In function 'int main()':
a.cc:13:5: error: 'else' without a previous 'if'
   13 |     else if(stat[1]=='L');
      |     ^~~~
a.cc:15:5: error: 'else' without a previous 'if'
   15 |     else if(stat[1]=='E');
      |     ^~~~
Language: C++

#include <stdio.h>

int main(){
int n, ac=0, wa=0, tle=0, re=0;
char stat[100];
scanf("%d", &n);
for(int i=0;i<n;i++){
    scanf("%s", stat);
    if(stat[1]=='C'){
        ac++;
    }
    else if(stat[1]=='A');
        wa++;
    }
    else if(stat[1]=='L');
        tle++;
    }
    else if(stat[1]=='E');
        re++;
    }
}
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:
a.cc: In function 'int main()':
a.cc:15:5: error: 'else' without a previous 'if'
   15 |     else if(stat[1]=='L');
      |     ^~~~
a.cc: At global scope:
a.cc:18:5: error: expected unqualified-id before 'else'
   18 |     else if(stat[1]=='E');
      |     ^~~~
a.cc:19:9: error: 're' does not name a type
   19 |         re++;
      |         ^~
a.cc:20:5: error: expected declaration before '}' token
   20 |     }
      |     ^
a.cc:21:1: error: expected declaration before '}' token
   21 | }
      | ^
a.cc:22:7: error: expected constructor, destructor, or type conversion before '(' token
   22 | printf("AC x %d\n", ac);
      |       ^
a.cc:23:7: error: expected constructor, destructor, or type conversion before '(' token
   23 | printf("WA x %d\n", wa);
      |       ^
a.cc:24:7: error: expected constructor, destructor, or type conversion before '(' token
   24 | printf("TLE x %d\n", tle);
      |       ^
a.cc:25:7: error: expected constructor, destructor, or type conversion before '(' token
   25 | printf("RE x %d\n", re);
      |       ^
a.cc:27:1: error: expected unqualified-id before 'return'
   27 | return 0;
      | ^~~~~~
a.cc:28:1: error: expected declaration before '}' token
   28 | }
      | ^
Language: C

#include<iostream>
#include<string>
using namespace std;
int main()
{
	string arr[100000];
	int countAC = 0, countTLE = 0, countWA = 0 , countRE=0;
	int num;
	cin >> num;
	for (int i = 0; i < num; i++)
	{
		cin >> arr[i];
	}
	for (int i = 0; i < num; i++)
	{
		if (arr[i] == "AC")
			countAC++;
		else if (arr[i] == "TLE")
			countTLE++;
		else if (arr[i] == "WA")
			countWA++;
		else if (arr[i] == "RE")
			countRE++;

	}
	cout << "\nAC"<<" "<<"x"<<" " << countAC;
	cout << "\nWA" << " " << "x" <<" "<< countWA;
	cout << "\nTLE"<<" "<<"x" << " " << countTLE;
	cout << "\n RE " << " " <<"x" << " " << countRE;
	return 0;
}

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

#include <stdio.h>

int main(){
int n, AC=0, WA=0, TLE=0, RE=0;
char stat[100];
scanf("%d", &n);
for(int i=0;i<n;i++){
    scanf("%s", stat);
    if(stat[1]=='C'){
        AC++;
    }
    else if(stat[1]=='A');
        WA++;
    }
    else if(stat[1]=='L');
        TLE++;
    }
    else if(stat[1]=='E');
        RE++;
    }
}
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:
a.cc: In function 'int main()':
a.cc:15:5: error: 'else' without a previous 'if'
   15 |     else if(stat[1]=='L');
      |     ^~~~
a.cc: At global scope:
a.cc:18:5: error: expected unqualified-id before 'else'
   18 |     else if(stat[1]=='E');
      |     ^~~~
a.cc:19:9: error: 'RE' does not name a type
   19 |         RE++;
      |         ^~
a.cc:20:5: error: expected declaration before '}' token
   20 |     }
      |     ^
a.cc:21:1: error: expected declaration before '}' token
   21 | }
      | ^
a.cc:22:7: error: expected constructor, destructor, or type conversion before '(' token
   22 | printf("AC x %d\n", AC);
      |       ^
a.cc:23:7: error: expected constructor, destructor, or type conversion before '(' token
   23 | printf("WA x %d\n", WA);
      |       ^
a.cc:24:7: error: expected constructor, destructor, or type conversion before '(' token
   24 | printf("TLE x %d\n", TLE);
      |       ^
a.cc:25:7: error: expected constructor, destructor, or type conversion before '(' token
   25 | printf("RE x %d\n", RE);
      |       ^
a.cc:27:1: error: expected unqualified-id before 'return'
   27 | return 0;
      | ^~~~~~
a.cc:28:1: error: expected declaration before '}' token
   28 | }
      | ^
Language: C++

#include <stdio.h>

int main(){
int n, AC=0, WA=0, TLE=0, RE=0;
char stat[100];
scanf("%d", &n);
for(int i=0;i<n;i++);{
    scanf("%s", stat);
    if(stat[1]=='C');{
        AC++;
    }
    else if(stat[1]=='A');
        WA++;
    }
    else if(stat[1]=='L');
        TLE++;
    }
    else if(stat[1]=='E');
        RE++;
    }
}
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:
a.cc: In function 'int main()':
a.cc:12:5: error: 'else' without a previous 'if'
   12 |     else if(stat[1]=='A');
      |     ^~~~
a.cc:15:5: error: 'else' without a previous 'if'
   15 |     else if(stat[1]=='L');
      |     ^~~~
a.cc: At global scope:
a.cc:18:5: error: expected unqualified-id before 'else'
   18 |     else if(stat[1]=='E');
      |     ^~~~
a.cc:19:9: error: 'RE' does not name a type
   19 |         RE++;
      |         ^~
a.cc:20:5: error: expected declaration before '}' token
   20 |     }
      |     ^
a.cc:21:1: error: expected declaration before '}' token
   21 | }
      | ^
a.cc:22:7: error: expected constructor, destructor, or type conversion before '(' token
   22 | printf("AC x %d\n", AC);
      |       ^
a.cc:23:7: error: expected constructor, destructor, or type conversion before '(' token
   23 | printf("WA x %d\n", WA);
      |       ^
a.cc:24:7: error: expected constructor, destructor, or type conversion before '(' token
   24 | printf("TLE x %d\n", TLE);
      |       ^
a.cc:25:7: error: expected constructor, destructor, or type conversion before '(' token
   25 | printf("RE x %d\n", RE);
      |       ^
a.cc:27:1: error: expected unqualified-id before 'return'
   27 | return 0;
      | ^~~~~~
a.cc:28:1: error: expected declaration before '}' token
   28 | }
      | ^
Language: C

#include <iostream.h>
#include <cmath>
#include <string>
using namespace std;
int main()
{
	string arr[100000];
	int countAC = 0, countTLE = 0, countWA = 0 , countRE=0;
	int num;
	cin >> num;
	for (int i = 0; i < num; i++)
	{
		cin >> arr[i];
	}
	for (int i = 0; i < num; i++)
	{
		if (arr[i] == "AC")
			countAC++;
		else if (arr[i] == "TLE")
			countTLE++;
		else if (arr[i] == "WA")
			countWA++;
		else if (arr[i] == "RE")
			countRE++;

	}
	cout << "\nAC"<<" "<<"x"<<" " << countAC;
	cout << "\nWA" << " " << "x" <<" "<< countWA;
	cout << "\nTLE"<<" "<<"x" << " " << countTLE;
	cout << "\n RE " << " " <<"x" << " " << countRE;
	return 0;
}

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

#include <iostream>
#include <cmath>
#include <string>
using namespace std;
string arr[100000];
int main()
{
	int countAC = 0, countTLE = 0, countWA = 0 , countRE=0;
	int num;
	cin >> num;
	for (int i = 0; i < num; i++)
	{
		cin >> arr[i];
	}
	for (int i = 0; i < num; i++)
	{
		if (arr[i] == "AC")
			countAC++;
		else if (arr[i] == "TLE")
			countTLE++;
		else if (arr[i] == "WA")
			countWA++;
		else if (arr[i] == "RE")
			countRE++;

	}
	cout << "\nAC"<<" "<<"x"<<" " << countAC;
	cout << "\nWA" << " " << "x" <<" "<< countWA;
	cout << "\nTLE"<<" "<<"x" << " " << countTLE;
	cout << "\n RE " << " " <<"x" << " " << countRE;
	return 0;
}

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

#include <iostream>
#include <cmath>
#include <string>
using namespace std;
int main()
{
	string arr[100000];
	int countAC = 0, countTLE = 0, countWA = 0 , countRE=0;
	int num;
	cin >> num;
	for (int i = 0; i < num; i++)
	{
		cin >> arr[i];
	}
	for (int i = 0; i < num; i++)
	{
		if (arr[i] == "AC")
			countAC++;
		else if (arr[i] == "TLE")
			countTLE++;
		else if (arr[i] == "WA")
			countWA++;
		else if (arr[i] == "RE")
			countRE++;

	}
	cout << "\nAC"<<" "<<"x"<<" " << countAC;
	cout << "\nWA" << " " << "x" <<" "<< countWA;
	cout << "\nTLE"<<" "<<"x" << " " << countTLE;
	cout << "\n RE " << " " <<"x" << " " << countRE;
	return 0;
}

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

#include <iostream>
#include <cmath>
#include <string>
using namespace std;
int main()
{
	string arr[100000];
	int countAC = 0, countTLE = 0, countWA = 0 , countRE=0;
	int num;
	cin >> num;
	for (int i = 0; i < num; i++)
	{
		cin >> arr[i];
        }
	for (int i = 0; i < num; i++)
{
if (arr[i] == "AC")
			countAC++;
		else if (arr[i] == "TLE")
			countTLE++;
		else if (arr[i] == "WA")
			countWA++;
		else if (arr[i] == "RE")
			countRE++;

	}
	cout << "\nAC X " << countAC;
	cout << "\n WA X " << countWA;
	cout << "\n TLE X " << countTLE;
	cout << "\n RE x " << countRE;
	return 0;
}

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

#include <iostream>
#include <cmath>
#include <string>
using namespace std;
string arr[100000];
int main()
{
	
	int countAC = 0, countTLE = 0, countWA = 0 , countRE=0;
	int num;
	cin >> num;
	for (int i = 0; i < num; i++)
	{
		cin >> arr[i];
		if (arr[i] == "AC")
			countAC++;
		else if (arr[i] == "TLE")
			countTLE++;
		else if (arr[i] == "WA")
			countWA++;
		else if (arr[i] == "RE")
			countRE++;

	}
	cout << "\nAC X " << countAC;
	cout << "\n WA X " << countWA;
	cout << "\n TLE X " << countTLE;
	cout << "\n RE x " << countRE;
	return 0;
}

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

#include <iostream>
#include <cmath>
#include <string>
using namespace std;
int main()
{
	string arr[100000];
	int countAC = 0, countTLE = 0, countWA = 0 , countRE=0;
	int num;
	cin >> num;
	for (int i = 0; i < num; i++)
	{
		cin >> arr[i];
		if (arr[i] == "AC")
			countAC++;
		else if (arr[i] == "TLE")
			countTLE++;
		else if (arr[i] == "WA")
			countWA++;
		else if (arr[i] == "RE")
			countRE++;

	}
	cout << "\nAC X " << countAC;
	cout << "\n WA X " << countWA;
	cout << "\n TLE X " << countTLE;
	cout << "\n RE x " << countRE;
	return 0;
}

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

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

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


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

#include <bits/stdc++.h>

using namespace std;

int main(){
  int N, AC = 0, WA = 0, TLE = 0 , RE = 0;
  cin>>N;
  string c;
  for(int i=0; i<N; i++){
    cin>>c;
    switch(c){
      case "AC":
        AC++;
        break;
      case "WA":
        WA++;
        break;
      case "TLE":
        TLE++;
        break;
      case "RE":
        RE++;
        break;
    }
  }
  cout<<"AC x "<<AC<<"\n";
  cout<<"WA x "<<WA<<"\n";
  cout<<"TLE x "<<TLE<<"\n";
  cout<<"RE x "<<RE<<"\n";
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:12: error: switch quantity not an integer
   11 |     switch(c){
      |            ^
Language: C

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

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

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

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

#include <iostream>
#include <cstring>
using namespace std;
int main()
{
    int N, a = 0, y = 0, z = 0, c = 0, i;
    cin >> N;
    string a[N];
    for (int i = 0; i < N; i++) {
        cin >> a[i];
        if (a[i] == "AC")
            a = a + 1;
        if (a[i] == "WA")
            y = y + 1;
        if (a[i] == "TLE")
            z = z + 1;
        if (a[i] == "RE")
            c = c + 1;
    }
    cout << "AC x " << a << endl;
    cout << "WA x " << y << endl;
    cout << "TLE x " << z << endl;
    cout << "RE x " << c << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:12: error: conflicting declaration 'std::string a [N]'
    8 |     string a[N];
      |            ^
a.cc:6:12: note: previous declaration as 'int a'
    6 |     int N, a = 0, y = 0, z = 0, c = 0, i;
      |            ^
a.cc:10:17: error: invalid types 'int[int]' for array subscript
   10 |         cin >> a[i];
      |                 ^
a.cc:11:14: error: invalid types 'int[int]' for array subscript
   11 |         if (a[i] == "AC")
      |              ^
a.cc:13:14: error: invalid types 'int[int]' for array subscript
   13 |         if (a[i] == "WA")
      |              ^
a.cc:15:14: error: invalid types 'int[int]' for array subscript
   15 |         if (a[i] == "TLE")
      |              ^
a.cc:17:14: error: invalid types 'int[int]' for array subscript
   17 |         if (a[i] == "RE")
      |              ^
Language: C++

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

int main(){
  int N, A, W, T, R;
  A = 0;
  W = 0;
  T = 0;
  R = 0;
  
  string S;
  cin >> N;
  
  for(int i = 0; i < N; i++){
   cin >> S.at(i); 
   switch(S.at(i)){
     case "AC":
       A++;
       break;
     case "WA":
       W++;
       break;
     case "TLE":
       T++;
       break;
     case "RE":
       R++;
       break;
   }
    
    cout << "AC × " << A << endl;
    cout << "WA × " << W << endl;
    cout << "TLE × " << T << endl;
    cout << "RE × " << R << endl;
  }
  
  
 return 0; 
}


Compiler output:
a.cc: In function 'int main()':
a.cc:17:11: error: conversion from 'const char*' to 'int' in a converted constant expression
   17 |      case "AC":
      |           ^~~~
a.cc:17:11: error: could not convert '"AC"' from 'const char [3]' to 'int'
   17 |      case "AC":
      |           ^~~~
      |           |
      |           const char [3]
a.cc:20:11: error: conversion from 'const char*' to 'int' in a converted constant expression
   20 |      case "WA":
      |           ^~~~
a.cc:20:11: error: could not convert '"WA"' from 'const char [3]' to 'int'
   20 |      case "WA":
      |           ^~~~
      |           |
      |           const char [3]
a.cc:23:11: error: conversion from 'const char*' to 'int' in a converted constant expression
   23 |      case "TLE":
      |           ^~~~~
a.cc:23:11: error: could not convert '"TLE"' from 'const char [4]' to 'int'
   23 |      case "TLE":
      |           ^~~~~
      |           |
      |           const char [4]
a.cc:26:11: error: conversion from 'const char*' to 'int' in a converted constant expression
   26 |      case "RE":
      |           ^~~~
a.cc:26:11: error: could not convert '"RE"' from 'const char [3]' to 'int'
   26 |      case "RE":
      |           ^~~~
      |           |
      |           const char [3]
Language: C++

#include <iostream>
using namespace std;
int main()
{
	int c0=0, c1=0,c2=0,c3=0;
	int n;
	string s;
	
	cin >> n;
	for (int i=0; i<n; i++){
		cin >> s;
		if (s=="AC") c0++;
		else if (s=="WA") c1++;
		else if (s=="TLE") c2++;
		else (s=="RE") c3++;
	}
	
	cout << "AC x" << c0
	     << "WA x" << c1
	     << "TLE x" << c2
	     << "RE x" << c3;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:31: error: expected ';' before 'c3'
   15 |                 else (s=="RE") c3++;
      |                               ^~~
      |                               ;
a.cc:15:24: 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]
   15 |                 else (s=="RE") c3++;
      |                      ~~^~~~~~~
In file included from /usr/include/c++/14/string:54,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 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 <iostream>
using namespace std;

int main() 
{
	int c0=0,c1=0,c2=0,c3=0;
	int n;
	string s;
	
	cin>>n;
	for(int i=0;i<n;i++){
		cin>>s;
		if(s=="AC")c0++;
		else if(s=="WA")
		c1++;
		else if(s=="TLE")
		c2++;
		else 
		c3++;
	} 
	
	cout<<"AC x "<<c0<<endl
	<<"WA x "<<c1<<endl
	<<"TLE x "<<c2<<endl
	<<"RE x "<<c3<<endl;
	
	return 0;
}


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

#include <iostream>
using namespace std;
int main()
{
	int c0=0, c1=0,c2=0,c3=0;
	int n;
	string s;
	
	cin >> n;
	for (int i=0; i<n; i++){
		cin >> s;
		if (s=="AC") c0++;
		else if (s=="WA") c1++;
		else if (s=="TLE") c2++;
		else (s=="RE") c3++;
	}
	
	cout << "AC x" << c0
	     << "WA x" << c1
	     << "TLE x" << c2
	     << "RE x" << c3;
	     return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:31: error: expected ';' before 'c3'
   15 |                 else (s=="RE") c3++;
      |                               ^~~
      |                               ;
a.cc:15:24: 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]
   15 |                 else (s=="RE") c3++;
      |                      ~~^~~~~~~
In file included from /usr/include/c++/14/string:54,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 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 c0=0,c1=0,c2=0,c3=0,n;
	string s;
	cin>>n;
	for(int i=0;i<n;i++)
	{
		cin>>s;
		if(s=="AC")
		c0++;
		if(s=="WA")
		c1++;
		if(s=="TLE")
		c2++;
		if(s=="RE")
		c3++;
	}
	cout<<"AC x "<<c0<<endl
	cout<<"WA x "<<c1<<endl
	cout<<"TLE x "<<c2<<endl
	cout<<"RE x "<<c3<<endl;
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:32: error: expected ';' before 'cout'
   20 |         cout<<"AC x "<<c0<<endl
      |                                ^
      |                                ;
   21 |         cout<<"WA x "<<c1<<endl
      |         ~~~~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:20:13: error: expected primary-expression before '<<' token
   20 |             <<"WA x "<<c1;
      |             ^~
a.cc:21:13: error: expected primary-expression before '<<' token
   21 |             <<"TLE x "<<c2;
      |             ^~
a.cc:22:13: error: expected primary-expression before '<<' token
   22 |             <<"RE x "<<c3;
      |             ^~
Language: C++

#include <iostream>
#include <string>

int main() {
  	long n, ac = 0, wa = 0, tle = 0, re = 0;
  	std::cin >> n;
  	std::string x;
  	for ( long l = 0; l < N; l++ ) {
      	std::cin >> x;
      	if ( x == "AC" )
          	ac++;
      	else if ( x == "WA" ) 
          	wa++;
      	else if ( x == "TLE" )
          	tle++;
      	else if ( x == "RE" )
          	re++;
    }
  	std::cout << "AC x " << ac << std::endl;
  	std::cout << "WA x " << wa << std::endl;
  	std::cout << "TLE x " << tle << std::endl;
  	std::cout << "RE x " << re << std::endl;
  	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:31: error: 'N' was not declared in this scope
    8 |         for ( long l = 0; l < N; l++ ) {
      |                               ^
Language: C++

#include <iostream>
#include <string>

int main() {
  	long n, ac = 0, wa = 0, tle = 0, re = 0;
  	std::cin >> n;
  	string x;
  	for ( long l = 0; l < N; l++ ) {
      	std::cin >> x;
      	if ( x == "AC" )
          	ac++;
      	else if ( x == "WA" ) 
          	wa++;
      	else if ( x == "TLE" )
          	tle++;
      	else if ( x == "RE" )
          	re++;
    }
  	std::cout << "AC x " << ac << std::endl;
  	std::cout << "WA x " << wa << std::endl;
  	std::cout << "TLE x " << tle << std::endl;
  	std::cout << "RE x " << re << std::endl;
  	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:9: error: 'string' was not declared in this scope
    7 |         string x;
      |         ^~~~~~
a.cc:7:9: note: suggested alternatives:
In file included from /usr/include/c++/14/iosfwd:41,
                 from /usr/include/c++/14/ios:40,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stringfwd.h:77:33: note:   'std::string'
   77 |   typedef basic_string<char>    string;
      |                                 ^~~~~~
In file included from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44:
/usr/include/c++/14/string:76:11: note:   'std::pmr::string'
   76 |     using string    = basic_string<char>;
      |           ^~~~~~
a.cc:8:31: error: 'N' was not declared in this scope
    8 |         for ( long l = 0; l < N; l++ ) {
      |                               ^
a.cc:9:21: error: 'x' was not declared in this scope
    9 |         std::cin >> x;
      |                     ^
Language: C

#include <stdio.h>

#define MAX_N 100000

int main(void) {
  int n;
  int ac = wa = tle = re = 0;
  int i;
  
  scanf("%d", &n);
  for (i=0; i<n; i++) {
    char *str;
    scanf("%s",str);
    switch(str[0]) {
      case 'a':ac++;break;
      case 'w':wa++;break;
      case 't':tle++;break;
      case 'r':re++;break;
    }
  }
  printf("AC x %d\nWA x %d\nTLE x %d\nRE x %d",ac,wa,tle,re);
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:7:12: error: 'wa' undeclared (first use in this function)
    7 |   int ac = wa = tle = re = 0;
      |            ^~
main.c:7:12: note: each undeclared identifier is reported only once for each function it appears in
main.c:7:17: error: 'tle' undeclared (first use in this function)
    7 |   int ac = wa = tle = re = 0;
      |                 ^~~
main.c:7:23: error: 're' undeclared (first use in this function)
    7 |   int ac = wa = tle = re = 0;
      |                       ^~
Language: C++

#include<bits/stdc++.h>
using namespace std;
unordered_map<string,int> mp;
int main(){
  int n; cin>>n; string s;
  while(n--){ cin>>s; mp[s]++; }
  cout<<"AC x "<<mp["AC"]<<endl;
  cout<<"WA x "<<mp["WA"]<<endl;
  cout<<"TLE x "<<mp["TLE"]<<endl;
  cout<<"RE x "<<mp["RE"]<<endl;

Compiler output:
a.cc: In function 'int main()':
a.cc:10:33: error: expected '}' at end of input
   10 |   cout<<"RE x "<<mp["RE"]<<endl;
      |                                 ^
a.cc:4:11: note: to match this '{'
    4 | int main(){
      |           ^
Language: C

#include <iostream>
#include <set>
#include <string>

using namespace std;

int main() {
    int n; cin >> n;
    string temp;
    int ac = 0, wa = 0, tle = 0, re = 0;
    for(int i = 0; i < n; i++) {
        cin >> temp;
        if(temp == "AC") ac++;
        else if(temp == "WA") wa++;
        else if(temp == "TLE") tle++;
        else if(temp == "RE") re++;
    }
    cout << "AC x " << ac << "\n"
        << "WA x " << wa << "\n"
        << "TLE x " << tle << "\n"
        << "RE x " << re << "\n";
}

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