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

#include <vector>
#include <map>
#include <string>
#include<set>
using namespace std; 
 
int main(void){
    int N;
  	scanf("%d",&N);
  	vector<string> S(N);
    for(int i=0;i<N;i++){
      cin >> S.at(i);
  	}
  	int ac=0;
    int wa=0;
    int tle=0;
    int re=0;
  	for(int j=0;j<N;j++){
      if(S.at(j)=="AC"){
         ac++;
      }else if(S.at(j)=="WA"){
        wa++;
      }else if(S.at(j)=="TLE"){
        tle++;
      }else if(S.at(j)=="RE"){
        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);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:7: error: 'cin' was not declared in this scope
   12 |       cin >> S.at(i);
      |       ^~~
a.cc:5:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    4 | #include<set>
  +++ |+#include <iostream>
    5 | using namespace std;
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int n;
  vector<string>vec(n);
  int a=0;
  int b=0;
  int c=0;
  int d=0;
  for (int i=0;i<n;i++){
    if (vec.at(i)=="AC"){
      a+=1;}
   else if (vec.at(i)=="WA"){
      b+=1;}
    else if (vec.at(i)=="TLE"){
      c+=1;}
    else if (vec.at(i)=="RE"){
      d+=1;}
  }
  cout<<"AC×"a<<endl;
  cout<<"WA×"b<<endl;
  cout<<"TLE×"c<<endl;
  cout<<"RE×"d<<endl;}


Compiler output:
a.cc: In function 'int main()':
a.cc:20:9: error: unable to find string literal operator 'operator""a' with 'const char [5]', 'long unsigned int' arguments
   20 |   cout<<"AC×"a<<endl;
      |         ^~~~~~
a.cc:21:9: error: unable to find string literal operator 'operator""b' with 'const char [5]', 'long unsigned int' arguments
   21 |   cout<<"WA×"b<<endl;
      |         ^~~~~~
a.cc:22:9: error: unable to find string literal operator 'operator""c' with 'const char [6]', 'long unsigned int' arguments
   22 |   cout<<"TLE×"c<<endl;
      |         ^~~~~~~
a.cc:23:9: error: unable to find string literal operator 'operator""d' with 'const char [5]', 'long unsigned int' arguments
   23 |   cout<<"RE×"d<<endl;}
      |         ^~~~~~
Language: C++

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

int main(void)
{
  int i,j;
  int ac,tle,wa,re;
  ac =0; tle =0; wa =0; re =0;
  cin >> i;
  char d[i];
  for(j=0; j<i;j++){
   cin >> d[i];
  }
  for(int k=0;k<i;k++){
    if(d[k] == 'AC'){ ac++;
    }
    else if(d[k] == 'WA'){
     wa++;
    }
    else if(d[k] == 'TLE'){
     tle++:
    }
    else if(d[k] == 're'){
     re++:
    }
    print("AC × %d\n",ac);
    print("WA × %d\n",wa);
    print("TLE × %d\n",tle);
    print("RE × %d\n",re);
  }

Compiler output:
a.cc:15:16: warning: multi-character character constant [-Wmultichar]
   15 |     if(d[k] == 'AC'){ ac++;
      |                ^~~~
a.cc:17:21: warning: multi-character character constant [-Wmultichar]
   17 |     else if(d[k] == 'WA'){
      |                     ^~~~
a.cc:20:21: warning: multi-character character constant [-Wmultichar]
   20 |     else if(d[k] == 'TLE'){
      |                     ^~~~~
a.cc:23:21: warning: multi-character character constant [-Wmultichar]
   23 |     else if(d[k] == 're'){
      |                     ^~~~
a.cc: In function 'int main()':
a.cc:21:11: error: expected ';' before ':' token
   21 |      tle++:
      |           ^
      |           ;
a.cc:24:10: error: expected ';' before ':' token
   24 |      re++:
      |          ^
      |          ;
a.cc:26:5: error: 'print' was not declared in this scope; did you mean 'rint'?
   26 |     print("AC × %d\n",ac);
      |     ^~~~~
      |     rint
a.cc:30:4: error: expected '}' at end of input
   30 |   }
      |    ^
a.cc:5:1: note: to match this '{'
    5 | {
      | ^
Language: C

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

Compiler output:
main.c: In function 'main':
main.c:9:20: error: expected ')' before ';' token
    9 |     scanf("%s",s[N];
      |          ~         ^
      |                    )
main.c:26:32: error: expected declaration or statement at end of input
   26 |                                }
      |                                ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main(){
	int N;
	cin>>N;
	vector<string>C(N);
	vector<int>ANS(4)={0,0,0,0};

	for(int i=0;i<N;i++){
		cin>>C.at(i);
	}

	for(int i=0;i<N;i++){
		if(C.at(i)=="AC")ANS.at(0)++;
		if(C.at(i)=="WA")ANS.at(1)++;
		if(C.at(i)=="TLE")ANS.at(2)++;
		if(C.at(i)=="RE")ANS.at(3)++;
	}

	cout<<"AC x "+ANS.at(0)<<endl;
	cout<<"WA x "+ANS.at(1)<<endl;
	cout<<"TLE x "+ANS.at(2)<<endl;
	cout<<"RE x "+ANS.at(3)<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:26: error: expected ',' or ';' before '=' token
    8 |         vector<int>ANS(4)={0,0,0,0};
      |                          ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int n, count1, count2, count3, count4;
  cin >> n;
  
  vector<string> vec(n);
  for (int i = 0; i < n; i++) {
    cin >> vec.at(i);
  }
  
  count1 = 0;
  count2 = 0;
  count3 = 0;
  count4 = 0;
  for (int i = 0; i < n; i++) {
    if (vec.at(i) = "AC") count1++;
    else if (vec.at(i) == "WA") count2++;
    else if (vec.at(i) == "TLE") count3++;
    else if (vec.at(i) == "RE") count4++;
  }
  
  cout << "AC x " << count1 << endl;
  cout << "WA x " << count2 << endl;
  cout << "TLE x " << count3 << endl;
  cout << "RE x " << count4 << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:18:19: error: could not convert '(& vec.std::vector<std::__cxx11::basic_string<char> >::at(((std::vector<std::__cxx11::basic_string<char> >::size_type)i)))->std::__cxx11::basic_string<char>::operator=(((const char*)"AC"))' from 'std::__cxx11::basic_string<char>' to 'bool'
   18 |     if (vec.at(i) = "AC") count1++;
      |         ~~~~~~~~~~^~~~~~
      |                   |
      |                   std::__cxx11::basic_string<char>
Language: C++

n = int(input())
k = {}
k['AC\r'] =0
k["TLE\r"]=0
k["WA\r"]=0
k["RE\r"]=0
for i in range(n):
    a = str(input())
    #print(a)
    if a in k:
        k[a]+=1
print("AC x {}".format(k['AC\r']))
print("WA x {}".format(k['WA\r']))
print("TLE x {}".format(k['TLE\r']))
print("RE x {}".format(k['RE\r']))

Compiler output:
a.cc:3:3: warning: multi-character character constant [-Wmultichar]
    3 | k['AC\r'] =0
      |   ^~~~~~
a.cc:9:6: error: invalid preprocessing directive #print
    9 |     #print(a)
      |      ^~~~~
a.cc:12:26: warning: multi-character character constant [-Wmultichar]
   12 | print("AC x {}".format(k['AC\r']))
      |                          ^~~~~~
a.cc:13:26: warning: multi-character character constant [-Wmultichar]
   13 | print("WA x {}".format(k['WA\r']))
      |                          ^~~~~~
a.cc:14:27: warning: multi-character character constant [-Wmultichar]
   14 | print("TLE x {}".format(k['TLE\r']))
      |                           ^~~~~~~
a.cc:15:26: warning: multi-character character constant [-Wmultichar]
   15 | print("RE x {}".format(k['RE\r']))
      |                          ^~~~~~
a.cc:1:1: error: 'n' does not name a type
    1 | n = int(input())
      | ^
a.cc:3:1: error: 'k' does not name a type
    3 | k['AC\r'] =0
      | ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int n;
  cin >> n;
  int count=0,count1=0;count2=0;count3=0;
  for(int i=0;i<n;i++){
    string ss;
    cin >> ss;
    if(ss=="AC")count++;
    if(ss=="WA")count1++;
    if(ss=="TLE")count2++;
    if(ss=="RE")count3++;
    
    i++;
  }
  cout << "AC" << " " << "x" << " " << count << endl;
  cout << "WA" << " " << "x" << " " << count1 << endl;
  cout << "TLE" << " " << "x" << " " << count2 << endl;
  cout << "RE" << " " << "x" << " " << count3 << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:24: error: 'count2' was not declared in this scope; did you mean 'count1'?
    6 |   int count=0,count1=0;count2=0;count3=0;
      |                        ^~~~~~
      |                        count1
a.cc:6:33: error: 'count3' was not declared in this scope; did you mean 'count1'?
    6 |   int count=0,count1=0;count2=0;count3=0;
      |                                 ^~~~~~
      |                                 count1
Language: C++

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

int main()
{
    int n;
    cin >> n;
    vector<string> s(n);
    rep(i, n) cin >> s[i];
    int c0 = 0, c1 = 0, c2 = 0, c3 = 0;
    rep(i, n) {
        if (s[i] == "AC") c0++;
        if (s[i] == "WA") c1++;
        if (s[i] == "TLE") c2++;
        if (s[i] == "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:24:14: error: expected '}' at end of input
   24 |     return 0;
      |              ^
a.cc:8:1: note: to match this '{'
    8 | {
      | ^
Language: C

#include<stdio.h>
#include<stdlib.h>
 
int main(){
	char num[256], str[256];
	int i, nums;
  	int AC = 0;
  	int WA = 0;
  	int TLE = 0;
  	int RE = 0;
	fgets(num, sizeof(num), stdin);
  	nums = atoi(num);
  	for(i = 0; i < nums; i++){
      fgets(str, sizeof(str), stdin);
      if(strcmp(str, "AC\n") == 0){
        	AC++;
      }
      else if(strcmp(str, "WA\n") == 0){
        	WA++;
      }
      else if(strcmp(str, "TLE\n") == 0){
        	TLE++;
      }
      else if(strcmp(str, "RE\n") == 0){
        	RE++;
      }
    }  	
  	printf("AC × %d\n", AC);
  	printf("WA × %d\n, WA);
  	printf("TLE × %d\n", TLE);
  	printf("RE × %d\n", RE);
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:15:10: error: implicit declaration of function 'strcmp' [-Wimplicit-function-declaration]
   15 |       if(strcmp(str, "AC\n") == 0){
      |          ^~~~~~
main.c:3:1: note: include '<string.h>' or provide a declaration of 'strcmp'
    2 | #include<stdlib.h>
  +++ |+#include <string.h>
    3 | 
main.c:29:16: warning: missing terminating " character
   29 |         printf("WA × %d\n, WA);
      |                ^
main.c:29:16: error: missing terminating " character
   29 |         printf("WA × %d\n, WA);
      |                ^~~~~~~~~~~~~~~~
main.c:30:34: error: expected ')' before ';' token
   30 |         printf("TLE × %d\n", TLE);
      |                                  ^
      |                                  )
main.c:29:15: note: to match this '('
   29 |         printf("WA × %d\n, WA);
      |               ^
main.c:30:9: error: passing argument 1 of 'printf' makes pointer from integer without a cast [-Wint-conversion]
   30 |         printf("TLE × %d\n", TLE);
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~
      |         |
      |         int
In file included from main.c:1:
/usr/include/stdio.h:363:43: note: expected 'const char * restrict' but argument is of type 'int'
  363 | extern int printf (const char *__restrict __format, ...);
      |                    ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
main.c:32:18: error: expected ';' before '}' token
   32 |         return 0;
      |                  ^
      |                  ;
   33 | }
      | ~
Language: C++

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

int main()
{

  ll n, a=0, b=0, c=0, d=0;
	string s;
	while(n--){
		cin>>s;
		if(s=="AC")
		a++;
		else if(s=="WA")
		b++;
		else if(s=="TLE")
		c++;
		else
		d++;
	}
	cout<<"AC x "<<a<<"\n";
	cout<<"WA x "<<b<<"\n";
	cout<<"TLE x "<<c<<"\n";
	cout<<"RE x "<<d<<;
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:24:27: error: expected primary-expression before ';' token
   24 |         cout<<"RE x "<<d<<;
      |                           ^
Language: C

#include<stdio.h>

int main(void){
  int N;
  int c0,c1,c2,c3;
  char s[n];
  
  for(i=0;i<N;i++)
    scanf("%s",s[n];
  
  for(i=0;i<N;i++){
    if(strcmp(s[n],AC)
       c0++;
       else if(strcmp(s[n],WA)
               c1++;
               else if(strcmp(s[n],TLE)
                       c2++;
                       else if(strcmp(s[n],RE)
       						   c3++;
                               }
                               printf("AC × %d\n",c0);
                               printf("WA × %d\n",c1);
                               printf("TLE × %d\n",c2);
                               printf("RE × %d\n",c3);
                               return 0;
                               }

Compiler output:
main.c: In function 'main':
main.c:6:10: error: 'n' undeclared (first use in this function)
    6 |   char s[n];
      |          ^
main.c:6:10: note: each undeclared identifier is reported only once for each function it appears in
main.c:8:7: error: 'i' undeclared (first use in this function)
    8 |   for(i=0;i<N;i++)
      |       ^
main.c:9:20: error: expected ')' before ';' token
    9 |     scanf("%s",s[n];
      |          ~         ^
      |                    )
main.c:26:32: error: expected declaration or statement at end of input
   26 |                                }
      |                                ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int n;
  vector<string>vec(n);
  int a=0;
  int b=0;
  int c=0;
  int d=0;
  for (int i=0;i<n;i++){
    if (vec.at(i)="AC"){
      a+=1;}
   else if (vec.at(i)="WA"){
      b+=1;}
    else if (vec.at(i)="TLE"){
      c+=1;}
    else if (vec.at(i)="RE"){
      d+=1;}
  }
  cout<<"AC×"a<<endl;
  cout<<"WA×"b<<endl;
  cout<<"TLE×"c<<endl;
  cout<<"RE×"d<<endl;}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:18: error: could not convert '(& vec.std::vector<std::__cxx11::basic_string<char> >::at(((std::vector<std::__cxx11::basic_string<char> >::size_type)i)))->std::__cxx11::basic_string<char>::operator=(((const char*)"AC"))' from 'std::__cxx11::basic_string<char>' to 'bool'
   11 |     if (vec.at(i)="AC"){
      |         ~~~~~~~~~^~~~~
      |                  |
      |                  std::__cxx11::basic_string<char>
a.cc:13:22: error: could not convert '(& vec.std::vector<std::__cxx11::basic_string<char> >::at(((std::vector<std::__cxx11::basic_string<char> >::size_type)i)))->std::__cxx11::basic_string<char>::operator=(((const char*)"WA"))' from 'std::__cxx11::basic_string<char>' to 'bool'
   13 |    else if (vec.at(i)="WA"){
      |             ~~~~~~~~~^~~~~
      |                      |
      |                      std::__cxx11::basic_string<char>
a.cc:15:23: error: could not convert '(& vec.std::vector<std::__cxx11::basic_string<char> >::at(((std::vector<std::__cxx11::basic_string<char> >::size_type)i)))->std::__cxx11::basic_string<char>::operator=(((const char*)"TLE"))' from 'std::__cxx11::basic_string<char>' to 'bool'
   15 |     else if (vec.at(i)="TLE"){
      |              ~~~~~~~~~^~~~~~
      |                       |
      |                       std::__cxx11::basic_string<char>
a.cc:17:23: error: could not convert '(& vec.std::vector<std::__cxx11::basic_string<char> >::at(((std::vector<std::__cxx11::basic_string<char> >::size_type)i)))->std::__cxx11::basic_string<char>::operator=(((const char*)"RE"))' from 'std::__cxx11::basic_string<char>' to 'bool'
   17 |     else if (vec.at(i)="RE"){
      |              ~~~~~~~~~^~~~~
      |                       |
      |                       std::__cxx11::basic_string<char>
a.cc:20:9: error: unable to find string literal operator 'operator""a' with 'const char [5]', 'long unsigned int' arguments
   20 |   cout<<"AC×"a<<endl;
      |         ^~~~~~
a.cc:21:9: error: unable to find string literal operator 'operator""b' with 'const char [5]', 'long unsigned int' arguments
   21 |   cout<<"WA×"b<<endl;
      |         ^~~~~~
a.cc:22:9: error: unable to find string literal operator 'operator""c' with 'const char [6]', 'long unsigned int' arguments
   22 |   cout<<"TLE×"c<<endl;
      |         ^~~~~~~
a.cc:23:9: error: unable to find string literal operator 'operator""d' with 'const char [5]', 'long unsigned int' arguments
   23 |   cout<<"RE×"d<<endl;}
      |         ^~~~~~
Language: C++

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

int main(){
  int n;
  cin>>n;
  string s;
      int a=0,b=0,c=0,d=0;

  while(n--){
  cin>>s;
    if(s=="AC")
      a++;
    else if(s=="WA")
      b++;
    else if(s=="TLE")
      c++;
    else if(s=="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:29:1: error: expected unqualified-id before 'return'
   29 | return 0;}
      | ^~~~~~
a.cc:29:10: error: expected declaration before '}' token
   29 | return 0;}
      |          ^
Language: C

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

int main() {
  int i, N, C0=0, C1=0, C2=0, C3=0, C4=0;
  
  scanf("%d", &N);
  
  char S[N][4];
  
  for(i=0; i<N; i++) {
    scanf("%s", S[i]);
  }
  
  for(i=0; i<N; i++) {
    if(strcmp(S[i],"AC") == 0) {
      C0++;
    } else if(strcmp(S[i],"WA") == 0) {
      C1++;
    } else if(strcmp(S[i],"TLE") == 0) {
      C2++;
    } else if(strcmp(S[i],"RE") == 0) {
      C3++;
    } else {
      C4++;
    }
  }
  
  printf("AC x %d", C0);
  printf("WA x %d", C1);
  printf("TLE x %d", C2);
  printf("RE x %d", C3);

Compiler output:
main.c: In function 'main':
main.c:32:3: error: expected declaration or statement at end of input
   32 |   printf("RE x %d", C3);
      |   ^~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int n, count1, count2, count3, count4;
  cin >> n;
  
  vector<string> vec(n);
  for (int i = 0; i < n; i++) {
    cin >> vec.at(i);
  }
  
  count1 = 0;
  count2 = 0;
  count3 = 0;
  count4 = 0;
  for (int i = 0; i < n; i++) {
    if (vec.at(i) = "AC") count1++;
    else if (vec.at(i) = "WA") count2++;
    else if (vec.at(i) = "TLE") count3++;
    else if (vec.at(i) = "RE") count4++;
  }
  
  cout << "AC x " << count1 << endl;
  cout << "WA x " << count2 << endl;
  cout << "TLE x " << count3 << endl;
  cout << "RE x " << count4 << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:18:19: error: could not convert '(& vec.std::vector<std::__cxx11::basic_string<char> >::at(((std::vector<std::__cxx11::basic_string<char> >::size_type)i)))->std::__cxx11::basic_string<char>::operator=(((const char*)"AC"))' from 'std::__cxx11::basic_string<char>' to 'bool'
   18 |     if (vec.at(i) = "AC") count1++;
      |         ~~~~~~~~~~^~~~~~
      |                   |
      |                   std::__cxx11::basic_string<char>
a.cc:19:24: error: could not convert '(& vec.std::vector<std::__cxx11::basic_string<char> >::at(((std::vector<std::__cxx11::basic_string<char> >::size_type)i)))->std::__cxx11::basic_string<char>::operator=(((const char*)"WA"))' from 'std::__cxx11::basic_string<char>' to 'bool'
   19 |     else if (vec.at(i) = "WA") count2++;
      |              ~~~~~~~~~~^~~~~~
      |                        |
      |                        std::__cxx11::basic_string<char>
a.cc:20:24: error: could not convert '(& vec.std::vector<std::__cxx11::basic_string<char> >::at(((std::vector<std::__cxx11::basic_string<char> >::size_type)i)))->std::__cxx11::basic_string<char>::operator=(((const char*)"TLE"))' from 'std::__cxx11::basic_string<char>' to 'bool'
   20 |     else if (vec.at(i) = "TLE") count3++;
      |              ~~~~~~~~~~^~~~~~~
      |                        |
      |                        std::__cxx11::basic_string<char>
a.cc:21:24: error: could not convert '(& vec.std::vector<std::__cxx11::basic_string<char> >::at(((std::vector<std::__cxx11::basic_string<char> >::size_type)i)))->std::__cxx11::basic_string<char>::operator=(((const char*)"RE"))' from 'std::__cxx11::basic_string<char>' to 'bool'
   21 |     else if (vec.at(i) = "RE") count4++;
      |              ~~~~~~~~~~^~~~~~
      |                        |
      |                        std::__cxx11::basic_string<char>
Language: C++

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

int main(){
  int n;
  cin>>n;
  string s;
  while(n--){
  cin>>s;
    int a=0,b=0,c=0,d=0;
    if(s=="AC")
      a++;
    else if(s=="WA")
      b++;
    else if(s=="TLE")
      c++;
    else if(s=="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: In function 'int main()':
a.cc:22:18: error: 'a' was not declared in this scope
   22 |   cout<<"AC x "<<a<<endl;
      |                  ^
a.cc:23:18: error: 'b' was not declared in this scope
   23 |   cout<<"WA x "<<b<<endl;
      |                  ^
a.cc:24:19: error: 'c' was not declared in this scope
   24 |   cout<<"TLE x "<<c<<endl;
      |                   ^
a.cc:25:18: error: 'd' was not declared in this scope
   25 |   cout<<"RE x "<<d<<endl;
      |                  ^
a.cc: At global scope:
a.cc:27:1: error: expected unqualified-id before 'return'
   27 | return 0;}
      | ^~~~~~
a.cc:27:10: error: expected declaration before '}' token
   27 | return 0;}
      |          ^
Language: C

#include<stdio.h>
#include<stdlib.h>

int main(){
	char num[256], str[256];
	int i, num;
  	int AC = 0;
  	int WA = 0;
  	int TLE = 0;
  	int RE = 0;
	fgets(num, sizeof(num), stdin);
  	num = atoi(num);
  	for(i = 0; i < num; i++){
      fgets(str, sizeof(str), stdin);
      if(strcmp(str, "AC\n") == 0){
        	AC++;
      }
      else if(strcmp(str, "WA\n") == 0){
        	WA++;
      }
      else if(strcmp(str, "TLE\n") == 0){
        	TLE++;
      }
      else if(strcmp(str, "RE\n") == 0){
        	RE++;
      }
    }  	
  	printf("AC × %d", AC);
  	printf("WA × %d", WA);
  	printf("TLE × %d", TLE);
  	printf("RE × %d", RE);
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:16: error: conflicting types for 'num'; have 'int'
    6 |         int i, num;
      |                ^~~
main.c:5:14: note: previous declaration of 'num' with type 'char[256]'
    5 |         char num[256], str[256];
      |              ^~~
main.c:15:10: error: implicit declaration of function 'strcmp' [-Wimplicit-function-declaration]
   15 |       if(strcmp(str, "AC\n") == 0){
      |          ^~~~~~
main.c:3:1: note: include '<string.h>' or provide a declaration of 'strcmp'
    2 | #include<stdlib.h>
  +++ |+#include <string.h>
    3 |
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int n, count1, count2, count3, count4;
  cin >> n;
  
  vector<string> vec(n);
  for (int i = 0; i < n; i++) {
    cin >> vec.at(i);
  }
  
  count1 = 0;
  count2 = 0;
  count3 = 0;
  count4 = 0;
  for (int i = 0; i < n; i++) {
    string a = vec.at(i);
    if (a = "AC") count1++;
    else if (a = "WA") count2++;
    else if (a = "TLE") count3++;
    else if (a = "RE") count4++;
  }
  
  cout << "AC x " << count1 << endl;
  cout << "WA x " << count2 << endl;
  cout << "TLE x " << count3 << endl;
  cout << "RE x " << count4 << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:11: error: could not convert 'a.std::__cxx11::basic_string<char>::operator=(((const char*)"AC"))' from 'std::__cxx11::basic_string<char>' to 'bool'
   19 |     if (a = "AC") count1++;
      |         ~~^~~~~~
      |           |
      |           std::__cxx11::basic_string<char>
a.cc:20:16: error: could not convert 'a.std::__cxx11::basic_string<char>::operator=(((const char*)"WA"))' from 'std::__cxx11::basic_string<char>' to 'bool'
   20 |     else if (a = "WA") count2++;
      |              ~~^~~~~~
      |                |
      |                std::__cxx11::basic_string<char>
a.cc:21:16: error: could not convert 'a.std::__cxx11::basic_string<char>::operator=(((const char*)"TLE"))' from 'std::__cxx11::basic_string<char>' to 'bool'
   21 |     else if (a = "TLE") count3++;
      |              ~~^~~~~~~
      |                |
      |                std::__cxx11::basic_string<char>
a.cc:22:16: error: could not convert 'a.std::__cxx11::basic_string<char>::operator=(((const char*)"RE"))' from 'std::__cxx11::basic_string<char>' to 'bool'
   22 |     else if (a = "RE") count4++;
      |              ~~^~~~~~
      |                |
      |                std::__cxx11::basic_string<char>
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main()
{
  int n,ca=0,ct=0,cw=0,cr=0;
  cin>>n;
  while(n--)
  {
    string s;
    cin>>s;
    if(s=="AC")
      ca++;
    if(s=="WA")
      cw+;
    if(s=="TLE")
      ct++;
    if(s=="RE")
      cr++;
  }
  cout<<"AC x "<<ca<<endl;
  cout<<"WA x "<<cw<<endl;
  cout<<"TLE x "<<ct<<endl;
  cout<<"RE x "<<cr<<endl;
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:10: error: expected primary-expression before ';' token
   14 |       cw+;
      |          ^
Language: Java

import java.util.Scanner;

public class B {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int countAC = 0;
		int countWA = 0;
		int countTLE = 0;
		int countRE = 0;
		for(int i=0; i<n; i++) {
			String curr = sc.nextLine();
			if(curr.equals("AC")) countAC++;
			if(curr.equals("WA")) countWA++;
			if(curr.equals("TLE")) countTLE++;
			if(curr.equals("RE")) countRE++;

		}
		System.out.println("AC x "+ countAC);
		System.out.println("WA x "+ countWA);
		System.out.println("TLE x "+ countTLE);
		System.out.println("RE x "+ countRE);

	}

}


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

#include<iostream>
#include<bits/stdc++.h>
int main()
{
  int n;
  cin>>n;
  int a=0,b=0,c=0,d=0;
  string s;
  while(n--)
  {
    cin>>s;
    if(s=='AC')
      a++;
    else if(s=='WA')
      b++;
   else if(s=='TLE')
     c++;
    else
      d++;
    
  }
  cout<<"AC x "<<a<<endl;
   cout<<"WA x "<<b<<endl;
   cout<<"TLE x "<<c<<endl;
   cout<<"RE x "<<d<<endl;
}

Compiler output:
a.cc:12:11: warning: multi-character character constant [-Wmultichar]
   12 |     if(s=='AC')
      |           ^~~~
a.cc:14:16: warning: multi-character character constant [-Wmultichar]
   14 |     else if(s=='WA')
      |                ^~~~
a.cc:16:15: warning: multi-character character constant [-Wmultichar]
   16 |    else if(s=='TLE')
      |               ^~~~~
a.cc: In function 'int main()':
a.cc:6:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    6 |   cin>>n;
      |   ^~~
      |   std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:8:3: error: 'string' was not declared in this scope
    8 |   string s;
      |   ^~~~~~
a.cc:8:3: note: suggested alternatives:
In file included from /usr/include/c++/14/iosfwd:41,
                 from /usr/include/c++/14/ios:40,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41:
/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:11:10: error: 's' was not declared in this scope
   11 |     cin>>s;
      |          ^
a.cc:22:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   22 |   cout<<"AC x "<<a<<endl;
      |   ^~~~
      |   std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:22:21: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   22 |   cout<<"AC x "<<a<<endl;
      |                     ^~~~
      |                     std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
  int n;
  cin>>n;
  vector<string> v(n);
  for(int i=0;i<n;i++)
  {
    string s;
    cin>>s;
    v.push_back(s);
  }
  int ac=0,wa=0,tle=0,re=0;
  for(int i=0;i<v.size();i++)
  {
    if(v[i]=="AC") {ac++;}
    if(v[i]=="WA") {wa++;}
    if(v[i]=="TLE"}{tle++;}
    if(v[i]=="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:19:19: error: expected ')' before '}' token
   19 |     if(v[i]=="TLE"}{tle++;}
      |       ~           ^
      |                   )
a.cc:19:19: error: expected primary-expression before '}' token
a.cc:20:10: error: 'i' was not declared in this scope
   20 |     if(v[i]=="RE" }{re++;}
      |          ^
a.cc:20:18: error: expected ')' before '}' token
   20 |     if(v[i]=="RE" }{re++;}
      |       ~          ^~
      |                  )
a.cc:20:19: error: expected primary-expression before '}' token
   20 |     if(v[i]=="RE" }{re++;}
      |                   ^
a.cc: At global scope:
a.cc:20:20: error: expected unqualified-id before '{' token
   20 |     if(v[i]=="RE" }{re++;}
      |                    ^
a.cc:21:3: error: expected declaration before '}' token
   21 |   }
      |   ^
a.cc:22:3: error: 'cout' does not name a type
   22 |   cout<<"AC "<<"x "<<ac<<endl;
      |   ^~~~
a.cc:23:3: error: 'cout' does not name a type
   23 |   cout<<"WA "<<"x "<<wa<<endl;
      |   ^~~~
a.cc:24:3: error: 'cout' does not name a type
   24 |   cout<<"TLE "<<"x "<<tle<<endl;
      |   ^~~~
a.cc:25:3: error: 'cout' does not name a type
   25 |   cout<<"RE "<<"x "<<re<<endl;
      |   ^~~~
a.cc:26:1: error: expected declaration before '}' token
   26 | }
      | ^
Language: C++

# #include <iostream>
#include <stdio.h>

using namespace std;
int main()
{
  int num,count1=0,count2=0,count3=0,count4=0;
  string temp;
  cin>> num;
  for(int i =0; i<num ; i++)
  {
    cin>>temp;
    if(temp =="AC"){
		count1 ++;
    }
    else if(temp =="WA")
    {
		count2 ++;
    }
    else if (temp =="TLE")
    {
      	count3++;
    }
    else 
      	count4 ++;
  }
  cout <<"AC x "<<count1<<endl;
  cout <<"WA x "<<count2<<endl;
  cout <<"TLE x "<<count3<<endl;
  cout <<"RE x "<<count4<<endl;
  return 0;
}

Compiler output:
a.cc:1:3: error: invalid preprocessing directive ##
    1 | # #include <iostream>
      |   ^
a.cc: In function 'int main()':
a.cc:8:3: error: 'string' was not declared in this scope
    8 |   string temp;
      |   ^~~~~~
a.cc:3:1: note: 'std::string' is defined in header '<string>'; this is probably fixable by adding '#include <string>'
    2 | #include <stdio.h>
  +++ |+#include <string>
    3 | 
a.cc:9:3: error: 'cin' was not declared in this scope
    9 |   cin>> num;
      |   ^~~
a.cc:3:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    2 | #include <stdio.h>
  +++ |+#include <iostream>
    3 | 
a.cc:12:10: error: 'temp' was not declared in this scope
   12 |     cin>>temp;
      |          ^~~~
a.cc:27:3: error: 'cout' was not declared in this scope
   27 |   cout <<"AC x "<<count1<<endl;
      |   ^~~~
a.cc:27:3: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:27:27: error: 'endl' was not declared in this scope
   27 |   cout <<"AC x "<<count1<<endl;
      |                           ^~~~
a.cc:3:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
    2 | #include <stdio.h>
  +++ |+#include <ostream>
    3 |
Language: C

#include<stdio.h>
#include<iostream>
using namespace std;
int main()
{
	int n,ac=0,wa=0,tle=0,re=0;
	cin>>n;
	string a[n];
	for(int i=0;i<n;i++)
	{
	cin>>a[i];
	if(a[i]=="AC")
	ac++;
	if(a[i]=="WA")
	wa++;
	if(a[i]=="TLE")
	tle++;
	if(a[i]=="RE")
	re++;
    }
    cout<<"AC*"<<ac<<endl;
    cout<<"WA*"<<wa<<endl;
    cout<<"TLE*"<<tle<<endl;
    cout<<"RE*"<<re<<endl;

}


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

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


Compiler output:
Main.java:12: error: variable ac might not have been initialized
    		ac++;
    		^
Main.java:14: error: variable wa might not have been initialized
    		wa++;
    		^
Main.java:16: error: variable tle might not have been initialized
    		tle++;
    		^
Main.java:18: error: variable re might not have been initialized
    		re++;
    		^
Main.java:20: error: variable ac might not have been initialized
    System.out.println("AC x "+ac);
                               ^
Main.java:21: error: variable wa might not have been initialized
    System.out.println("WA x "+wa);
                               ^
Main.java:22: error: variable tle might not have been initialized
    System.out.println("TLE x "+tle);
                                ^
Main.java:23: error: variable re might not have been initialized
    System.out.println("RE x "+re);
                               ^
8 errors
Language: C++

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


void solution(){
	ll n;
	cin>>n;
	string s;
	ll counter ac=0,wa=0,tle=0,re=0;
	for(ll 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<<"\nWA X "<<wa<<"\nTLE X "<<tle<<"\nRE X "<<re<<'\n';
}

int main(){
	ios_base::sync_with_stdio(0);
	cin.tie(0);
	cout.tie(0);
	cerr.tie(0);
	solution();
	return 0;
}

Compiler output:
a.cc: In function 'void solution()':
a.cc:10:20: error: expected initializer before 'ac'
   10 |         ll counter ac=0,wa=0,tle=0,re=0;
      |                    ^~
a.cc:14:25: error: 'ac' was not declared in this scope
   14 |                         ac++;
      |                         ^~
a.cc:16:25: error: 'wa' was not declared in this scope
   16 |                         wa++;
      |                         ^~
a.cc:18:25: error: 'tle' was not declared in this scope
   18 |                         tle++;
      |                         ^~~
a.cc:20:25: error: 're' was not declared in this scope
   20 |                         re++;
      |                         ^~
a.cc:22:24: error: 'ac' was not declared in this scope
   22 |         cout<<"AC X "<<ac<<"\nWA X "<<wa<<"\nTLE X "<<tle<<"\nRE X "<<re<<'\n';
      |                        ^~
a.cc:22:39: error: 'wa' was not declared in this scope
   22 |         cout<<"AC X "<<ac<<"\nWA X "<<wa<<"\nTLE X "<<tle<<"\nRE X "<<re<<'\n';
      |                                       ^~
a.cc:22:55: error: 'tle' was not declared in this scope
   22 |         cout<<"AC X "<<ac<<"\nWA X "<<wa<<"\nTLE X "<<tle<<"\nRE X "<<re<<'\n';
      |                                                       ^~~
a.cc:22:71: error: 're' was not declared in this scope
   22 |         cout<<"AC X "<<ac<<"\nWA X "<<wa<<"\nTLE X "<<tle<<"\nRE X "<<re<<'\n';
      |                                                                       ^~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
  int n;
  cin>>n;
  map<string,int>m;
  for(int i=0;i<n;i++)
  {
    string s;
    cin>>s;
    m[s]++;
  }
  cout<<"AC x "<<m[AC]<<endl;
  cout<<"WA x "<<m[WA]<<endl;
  cout<<"TLE x "<<m[TLE]<<endl;
  cout<<"RE x "<<m[RE]<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:20: error: 'AC' was not declared in this scope
   14 |   cout<<"AC x "<<m[AC]<<endl;
      |                    ^~
a.cc:15:20: error: 'WA' was not declared in this scope
   15 |   cout<<"WA x "<<m[WA]<<endl;
      |                    ^~
a.cc:16:21: error: 'TLE' was not declared in this scope
   16 |   cout<<"TLE x "<<m[TLE]<<endl;
      |                     ^~~
a.cc:17:20: error: 'RE' was not declared in this scope
   17 |   cout<<"RE x "<<m[RE]<<endl;
      |                    ^~
Language: C

#include <stdio.h>

int main(void) {
    int N, i, a = 0, w = 0, t = 0, r = 0;
    char s[4];
    scanf ("%d", &N);
    for (i = 0 ; i < N ; i++) {
        scanf ("%s", s);
        if (s[0] == 'A') a++;
        if (s[0] == 'W') w++;
        if (s[0] == 'T') t++;
        if (s[0] == 'R') r++;
    }
    printf ("AC x %d\nWA x %d\nTLE x %d\nRE x %d", a, w, t, r):
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:14:63: error: expected ';' before ':' token
   14 |     printf ("AC x %d\nWA x %d\nTLE x %d\nRE x %d", a, w, t, r):
      |                                                               ^
      |                                                               ;
Language: Java

import java.util.*;
import java.io.*;
public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
	
		int n = sc.nextInt();
		int ac = 0;
		int wa = 0;
		int tle = 0;
		int re = 0;
		
		for(int i=0;i<n;i++){
			String s = sc.next();

			if(s.equals("AC")){
				ac++;
			} else if(s.equals("WA")){
				wa++;
			} else if(s.equals("TLE")){
				tle++;
			} else if(s.equals("RE")){
				re++;
			}
		}
		System.out.println("AC" + " " + x + " " + ac);
		System.out.println("WA" + " " + x + " " + wa);
		System.out.println("TLE" + " " + x + " " + tle);
		System.out.println("RE" + " " + x + " " + re);
	}
}

Compiler output:
Main.java:26: error: cannot find symbol
		System.out.println("AC" + " " + x + " " + ac);
		                                ^
  symbol:   variable x
  location: class Main
Main.java:27: error: cannot find symbol
		System.out.println("WA" + " " + x + " " + wa);
		                                ^
  symbol:   variable x
  location: class Main
Main.java:28: error: cannot find symbol
		System.out.println("TLE" + " " + x + " " + tle);
		                                 ^
  symbol:   variable x
  location: class Main
Main.java:29: error: cannot find symbol
		System.out.println("RE" + " " + x + " " + re);
		                                ^
  symbol:   variable x
  location: class Main
4 errors
Language: C++


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

void b(std::istream& in)
{
    int N;
    in >> N;

    int countAC = 0;
    int countWA = 0;
    int countTLE = 0;
    int countRE = 0;
    for (int i = 0; i < N; ++i)
    {
        std::string result;
        in >> result;
        if (result == "AC")
        {
            ++countAC;
        }
        else if (result == "WA")
        {
            ++countWA;
        }
        else if (result == "TLE")
        {
            ++countTLE;
        }
        else if (result == "RE")
        {
            ++countRE;
        }
        else
        {
            assert(false);
        }
    }

    std::cout << "AC x " << countAC << std::endl;
    std::cout << "WA x " << countWA << std::endl;
    std::cout << "TLE x " << countTLE << std::endl;
    std::cout << "RE x " << countRE;
}

int main(int, char* [])
{
    b(std::cin);
    return 0;
}



Compiler output:
a.cc: In function 'void b(std::istream&)':
a.cc:41:13: error: 'assert' was not declared in this scope
   41 |             assert(false);
      |             ^~~~~~
a.cc:9:1: note: 'assert' is defined in header '<cassert>'; this is probably fixable by adding '#include <cassert>'
    8 | #include <algorithm>
  +++ |+#include <cassert>
    9 |
Language: C++

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


void solution(){
	ll n;
	cin>>n;
	string s;
	counter ac=0,wa=0,tle=0,re=0;
	for(ll 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<<"\nWA X "<<wa<<"\nTLE X "<<tle<<"\nRE X "<<re<<'\n';
}

int main(){
	ios_base::sync_with_stdio(0);
	cin.tie(0);
	cout.tie(0);
	cerr.tie(0);
	solution();
	return 0;
}

Compiler output:
a.cc: In function 'void solution()':
a.cc:10:9: error: 'counter' was not declared in this scope
   10 |         counter ac=0,wa=0,tle=0,re=0;
      |         ^~~~~~~
a.cc:14:25: error: 'ac' was not declared in this scope
   14 |                         ac++;
      |                         ^~
a.cc:16:25: error: 'wa' was not declared in this scope
   16 |                         wa++;
      |                         ^~
a.cc:18:25: error: 'tle' was not declared in this scope
   18 |                         tle++;
      |                         ^~~
a.cc:20:25: error: 're' was not declared in this scope
   20 |                         re++;
      |                         ^~
a.cc:22:24: error: 'ac' was not declared in this scope
   22 |         cout<<"AC X "<<ac<<"\nWA X "<<wa<<"\nTLE X "<<tle<<"\nRE X "<<re<<'\n';
      |                        ^~
a.cc:22:39: error: 'wa' was not declared in this scope
   22 |         cout<<"AC X "<<ac<<"\nWA X "<<wa<<"\nTLE X "<<tle<<"\nRE X "<<re<<'\n';
      |                                       ^~
a.cc:22:55: error: 'tle' was not declared in this scope
   22 |         cout<<"AC X "<<ac<<"\nWA X "<<wa<<"\nTLE X "<<tle<<"\nRE X "<<re<<'\n';
      |                                                       ^~~
a.cc:22:71: error: 're' was not declared in this scope
   22 |         cout<<"AC X "<<ac<<"\nWA X "<<wa<<"\nTLE X "<<tle<<"\nRE X "<<re<<'\n';
      |                                                                       ^~
Language: C++

#include <iostream>
#include <cstdio>
#include <algorithm>
#include <cmath>

int main() {
    using namespace std;
    long n,a=0,b=0,c=0,d=0;
    char s[5],sa[]="AC",sb[]="WA",sc[]="TLE",sd[]="RE";
    cin>>n;
    for (int i = 0; i < n; ++i) {
        cin>>s;
        if (strcmp(s,sa)==0)
            a++;
        if (strcmp(s,sb)==0)
            b++;
        if (strcmp(s,sc)==0)
            c++;
        if (strcmp(s,sd)==0)
            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: In function 'int main()':
a.cc:13:13: error: 'strcmp' was not declared in this scope
   13 |         if (strcmp(s,sa)==0)
      |             ^~~~~~
a.cc:5:1: note: 'strcmp' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    4 | #include <cmath>
  +++ |+#include <cstring>
    5 | 
a.cc:15:13: error: 'strcmp' was not declared in this scope
   15 |         if (strcmp(s,sb)==0)
      |             ^~~~~~
a.cc:15:13: note: 'strcmp' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
a.cc:17:13: error: 'strcmp' was not declared in this scope
   17 |         if (strcmp(s,sc)==0)
      |             ^~~~~~
a.cc:17:13: note: 'strcmp' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
a.cc:19:13: error: 'strcmp' was not declared in this scope
   19 |         if (strcmp(s,sd)==0)
      |             ^~~~~~
a.cc:19:13: note: 'strcmp' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
Language: C++

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

int main() {
  int N, a, w, t, r;
  cin >> N;
  a=0;
  w=0;
  t=0;
  r=0;
  vector<string> S(N);
  for (int i = 0; i < N; i++) {
    cin >> S.at(i);
  }
  for (int j = 0; j < N; j++) {
    if (S.at(j)=="AC") {
      a=a+1;
    }
    else {
      if (S.at(j)=="WA") {
        w=w+1;
      }
      else {
        if (S.at(j)=="TLE") {
          t=t+1;
        }
        else {
          r=r+1;
        }
      }
    }
  }
  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:36:23: error: expected ';' before 'endl'
   36 |   cout << "RE x " << r endl;
      |                       ^~~~~
      |                       ;
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
  int t;
  cin>>t;
  while(t--)
  {
    string s;
    cin>>s;
    int ac=0,tle=0,wa=0,re=0;
    if(s=="AC") ac++;
    if(s=="TLE") tle++;
    if(s=="WA") wa++;
    if(s=="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:17:18: error: 'ac' was not declared in this scope
   17 |   cout<<"AC x "<<ac<<endl;
      |                  ^~
a.cc:18:18: error: 'wa' was not declared in this scope
   18 |   cout<<"WA x "<<wa<<endl;
      |                  ^~
a.cc:19:19: error: 'tle' was not declared in this scope
   19 |   cout<<"TLE x "<<tle<<endl;
      |                   ^~~
a.cc:20:18: error: 're' was not declared in this scope
   20 |   cout<<"RE x "<<re<<endl;
      |                  ^~
Language: C++

#include<bits/stdc++.h>
#define endl "\n" 
#define pi acos(-1)
#define ll long long 
using namespace std;
void solve();
int main(){
	att();//sirra();
	int q=1;//cin>>q;
	while(q--){
		solve();
	}
}
void solve(){
	int n,ac(0),wa(0),tle(0),re(0);
  	string s1("AC"),s2("WA"),s3("TLE"),s4("RE"),s;
  cin>>n;
  for(int i=0;i<n;i++){
    cin>>s;
    if(s==s1)
      ac++;
    else if(s==s2)
      wa++;
    else if(s==s3)
      tle++;
    else
      re++;
  }
  cout<<s1<<" x "<<ac<<endl;
  cout<<s2<<" x "<<wa<<endl;
  cout<<s3<<" x "<<tle<<endl;
  cout<<s4<<" x "<<re<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:9: error: 'att' was not declared in this scope
    8 |         att();//sirra();
      |         ^~~
Language: C++

#include <bits/stdc++.h>

using namespace std;

int main() {
    long long int n;
    cin>>n;
    map<string,int> ma;
    map<string,int> ::iterator it;
    ma["AC"]=0;
    ma["TLE"]=0;
    ma["WA"]=0;
    ma["RE"]=0;
    for(int i=0;i<n;i++)
    {
        string s;
        cin>>s;
        ma[s]++;
    }
         cout<<"AC"<<" x "<<ma["AC"]<<endl;
         cout<<"WA"<<" x "<<ma["WA"]<<endl;
         cout<<"TLE"<<" x "<<ma["TLE"]<<endl;
         cout<<"RE"<<" x "<<ma["RE"]<<endl;
    
    return 0
}

Compiler output:
a.cc: In function 'int main()':
a.cc:25:13: error: expected ';' before '}' token
   25 |     return 0
      |             ^
      |             ;
   26 | }
      | ~
Language: C++

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

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

  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:17: error: 'c2' was not declared in this scope; did you mean 'c1'?
    8 |   int c0=0,c1=0;c2=0,c3=0;
      |                 ^~
      |                 c1
a.cc:8:22: error: 'c3' was not declared in this scope; did you mean 'c1'?
    8 |   int c0=0,c1=0;c2=0,c3=0;
      |                      ^~
      |                      c1