criyle/codenet-compile-errors huggingface dataset:
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];
    cin>>n;
    for (int i = 0; i < n; ++i) {
        cin>>s;
        if (strcmp(s,"AC")==0)
            a++;
        if (strcmp(s,"WA")==0)
            b++;
        if (strcmp(s,"TLE")==0)
            c++;
        if (strcmp(s,"RE")==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,"AC")==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,"WA")==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,"TLE")==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,"RE")==0)
      |             ^~~~~~
a.cc:19:13: note: 'strcmp' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
Language: C++

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

int main() {

	int N;
  cin >> N;
	vector<string> S(N);
	for (int i = 0; i < N; i++) {
		cin >> S.at(i);
	}
	int a = 0;
	int b = 0;
	int c = 0;
	int d = 0;
	for (int i = 0; i < N; i++) {
		if (S.at(i) == "AC") {
			a++;
		}
		else if (S.at(i) == "WA") {
			b++;
		}
		else if (S.at(i) == "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: In function 'int main()':
a.cc:29:28: error: expected ';' before '}' token
   29 |                         d++
      |                            ^
      |                            ;
   30 |                 }
      |                 ~
Language: C

#include<stdio.h>
#include<math.h>
#include<string.h>
int main()
{
  int N,a=0,b=0,c=0,d=0,i;
  char in[4];
  scanf("%d",&N);
  for(i=0;i<N;i++){
    scan("%s\n",in);
    if(strcmp(in,"AC")==0){
      a++;
    }else if(strcmp(in,"WA")==0){
      b++;
    }else if(strcmp(in,"TLE")==0){
      c++;
    }else if(strcmp(in,"RE")==0){
      d++;
    }
  }
  printf("AC x %d\nWA x %d\nTLE x %d\nRE x %d",a,b,c,d);
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:10:5: error: implicit declaration of function 'scan'; did you mean 'scanf'? [-Wimplicit-function-declaration]
   10 |     scan("%s\n",in);
      |     ^~~~
      |     scanf
Language: C++

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

int main() {
  int N;
  cin >> N;
  string S;
  int A = 0, W = 0, T = 0, R = 0;
  for (int i = 0; i < N; i++) {
    cin >> S;
    if (S == "AC")
      A++;
    else if (S == "WA")
      W++;
    else if (S == "TLE")
      T++;
    else if (S == "RE")
      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:20:19: error: invalid operands of types 'const char [6]' and 'const char [2]' to binary 'operator+'
   20 |   cout << "AC x " + "A" << endl;
      |           ~~~~~~~ ^ ~~~
      |           |         |
      |           |         const char [2]
      |           const char [6]
a.cc:21:19: error: invalid operands of types 'const char [6]' and 'const char [2]' to binary 'operator+'
   21 |   cout << "WA x " + "W" << endl;
      |           ~~~~~~~ ^ ~~~
      |           |         |
      |           |         const char [2]
      |           const char [6]
a.cc:22:20: error: invalid operands of types 'const char [7]' and 'const char [2]' to binary 'operator+'
   22 |   cout << "TLE x " + "T" << endl;
      |           ~~~~~~~~ ^ ~~~
      |           |          |
      |           |          const char [2]
      |           const char [7]
a.cc:23:19: error: invalid operands of types 'const char [6]' and 'const char [2]' to binary 'operator+'
   23 |   cout << "RE x " + "R" << endl;
      |           ~~~~~~~ ^ ~~~
      |           |         |
      |           |         const char [2]
      |           const char [6]
Language: C++

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

int main() {

	int N;
	vector<string> S(n);
	for (int i = 0; i < N; i++) {
		cin >> S.at(i);
	}
	int a = 0;
	int b = 0;
	int c = 0;
	int d = 0;
	for (int i = 0; i < N; i++) {
		if (S.at(i) == "AC") {
			a++;
		}
		else if (S.at(i) == "WA") {
			b++;
		}
		else if (S.at(i) == "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: In function 'int main()':
a.cc:9:26: error: 'n' was not declared in this scope
    9 |         vector<string> S(n);
      |                          ^
a.cc:28:28: error: expected ';' before '}' token
   28 |                         d++
      |                            ^
      |                            ;
   29 |                 }
      |                 ~
Language: C

#include<iostream>
#include<cstdio>
#include<string>
using namespace std;
int ans[5];
int main(){
	string str;
	int n;
	cin>>n;
	for(int i=1;i<=n;i++){
		cin>>str;
		if(str=="AC") ans[1]++;
		if(str=="WA") ans[2]++;
		if(str=="TLE") ans[3]++;
		if(str=="RE") ans[4]++;
	}
	cout<<"AC x "<<ans[1]<<endl;
	cout<<"WA x "<<ans[2]<<endl;
	cout<<"TLE x "<<ans[3]<<endl;
	cout<<"RE x "<<ans[4]<<endl;
	return 0;
}

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

include <bits/stdc++.h>
using namespace std;
 
int main() {
    int N;
    cin >> N;

    vector<string> vec(N);

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

    int a,b,c,d;
    a = 0;
    b = 0;
    c = 0;
    d = 0;

    for(int i = 0; i < N; i++){
        if(vec.at(i) == "AC"){
            a++;
        }
    }

    for(int i = 0; i < N; i++){
        if(vec.at(i) == "WA"){
            b++;
        }
    }

    for(int i = 0; i < N; i++){
        if(vec.at(i) == "TLE"){
            c++;
        }
    }

    for(int i = 0; i < N; i++){
        if(vec.at(i) == "RE"){
            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:1:1: error: 'include' does not name a type
    1 | include <bits/stdc++.h>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:6:5: error: 'cin' was not declared in this scope
    6 |     cin >> N;
      |     ^~~
a.cc:8:5: error: 'vector' was not declared in this scope
    8 |     vector<string> vec(N);
      |     ^~~~~~
a.cc:8:12: error: 'string' was not declared in this scope
    8 |     vector<string> vec(N);
      |            ^~~~~~
a.cc:8:20: error: 'vec' was not declared in this scope
    8 |     vector<string> vec(N);
      |                    ^~~
a.cc:44:5: error: 'cout' was not declared in this scope
   44 |     cout << "AC x " << a << endl;
      |     ^~~~
a.cc:44:29: error: 'endl' was not declared in this scope
   44 |     cout << "AC x " << a << endl;
      |                             ^~~~
Language: C++


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



int main()
{
    ll n;
    cin>>n;
    ll wa=0,ac=0,tle=0,re=0;
    vector<
    for(ll i=0;i<n;i++)
    {
        string s;
        cin>>s;
        if(s=="RE")
            re++;
        else if(s=="AC")
            ac++;
        else if(s=="TLE")
            tle++;
        else if(s=="WA")
            wa++;
        
    }
   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:14:14: error: template argument 1 is invalid
   14 |     for(ll i=0;i<n;i++)
      |              ^
a.cc:14:14: error: template argument 2 is invalid
a.cc:14:16: error: 'i' was not declared in this scope
   14 |     for(ll i=0;i<n;i++)
      |                ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define in cin>>
#define out cout<<
#define change endl

int main()
{
   int n,a=0,t=0,w=0,r=0;
    in n;
    while(n--)
    {
    string s;in s;
    if(s[0]=='A') a++;
if(s[0]=='T') t++;if(s[0]=='W') w++;if(s[0]=='R') r++;
}
    out "AC × "<<a;change;
    out "WA × "<<w;change;
    out "TLE × "<<t;change;
    out "RE × "<<r;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:26: error: statement cannot resolve address of overloaded function
   17 |     out "AC × "<<a;change;
      |                          ^
a.cc:18:26: error: statement cannot resolve address of overloaded function
   18 |     out "WA × "<<w;change;
      |                          ^
a.cc:19:27: error: statement cannot resolve address of overloaded function
   19 |     out "TLE × "<<t;change;
      |                           ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main(){
  int A;
  cin >> A;
  vector<string> vec(A);
  for(int i=0;i<A;i++){
    cin >> vec.at(i);
  }
  int a=0,b=0,c=0,d=0;
  for(int i=0;i<A;i++){
    if(vec.at(i)=="AC"){
      a++;
    }
    if(vec.at(i)=="WA"){
      b++;
    }
    if(vec.at(i)=="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:26:11: error: extended character 　 is not valid in an identifier
   26 |   cout << "AC x　"　<< a << endl;
      |           ^
a.cc:27:11: error: extended character 　 is not valid in an identifier
   27 |   cout << "WA x　"　<< b << endl;
      |           ^
a.cc:28:11: error: extended character 　 is not valid in an identifier
   28 |   cout << "TLE x　"　<< c << endl;
      |           ^
a.cc:29:11: error: extended character 　 is not valid in an identifier
   29 |   cout << "RE x　"　<< d << endl;
      |           ^
a.cc: In function 'int main()':
a.cc:26:11: error: unable to find string literal operator 'operator""\U00003000' with 'const char [8]', 'long unsigned int' arguments
   26 |   cout << "AC x　"　<< a << endl;
      |           ^~~~~~~~~~
a.cc:27:11: error: unable to find string literal operator 'operator""\U00003000' with 'const char [8]', 'long unsigned int' arguments
   27 |   cout << "WA x　"　<< b << endl;
      |           ^~~~~~~~~~
a.cc:28:11: error: unable to find string literal operator 'operator""\U00003000' with 'const char [9]', 'long unsigned int' arguments
   28 |   cout << "TLE x　"　<< c << endl;
      |           ^~~~~~~~~~~
a.cc:29:11: error: unable to find string literal operator 'operator""\U00003000' with 'const char [8]', 'long unsigned int' arguments
   29 |   cout << "RE x　"　<< d << endl;
      |           ^~~~~~~~~~
Language: C++

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

int main() {
  int a,b,c,d,e;
  cin >> a ;
  for(i=0;i<a;i++)
{
string f;
cin >>f;
if(f=="AC")
{
b+=1;
}
if(f=="WA")
{
c+=1;
}
if(f=="TLE")
{
d+=1;
}
if(f=="RA")
{
e+=1;
}
}
cout<<"AC x "<<b<<endl;
　cout<<"WA x "<<c<<endl;
cout<<"TLE x "<<d<<endl;
cout<<"RE x "<<e<<endl;
}

Compiler output:
a.cc:29:1: error: extended character 　 is not valid in an identifier
   29 | 　cout<<"WA x "<<c<<endl;
      | ^
a.cc: In function 'int main()':
a.cc:7:7: error: 'i' was not declared in this scope
    7 |   for(i=0;i<a;i++)
      |       ^
a.cc:29:1: error: '\U00003000cout' was not declared in this scope
   29 | 　cout<<"WA x "<<c<<endl;
      | ^~~~~~
Language: C++

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

int main() {
  int N;
  cin >> N;
  vector<string> test(N);
  for(int i=0; i<N; i++){
    cin >> test.at(i);
  }
  
  int AC=0;
  int WA=0;
  int TLE=0;
  int RE=0;
  for(int i=0; i<N; i++){
    if(test.at(i)=="AC"){
      AC++;
    }
    else if(test.at(i)=="WA"){
      WA++;
    }
    else if(test.at(i)=="TLE"){
      TLE++;
    }
    else{
      RE++;
    }
  }
  
  cout << "AC" << " " << × << AC << endl;
  cout << "WA" << " " << × << WA << endl;
  cout << "TLE" << " " << × << TLE << endl;
  cout << "RE" << " " << × << RE << endl;
}


Compiler output:
a.cc:31:26: error: extended character × is not valid in an identifier
   31 |   cout << "AC" << " " << × << AC << endl;
      |                          ^
a.cc:32:26: error: extended character × is not valid in an identifier
   32 |   cout << "WA" << " " << × << WA << endl;
      |                          ^
a.cc:33:27: error: extended character × is not valid in an identifier
   33 |   cout << "TLE" << " " << × << TLE << endl;
      |                           ^
a.cc:34:26: error: extended character × is not valid in an identifier
   34 |   cout << "RE" << " " << × << RE << endl;
      |                          ^
a.cc: In function 'int main()':
a.cc:31:26: error: '\U000000d7' was not declared in this scope
   31 |   cout << "AC" << " " << × << AC << endl;
      |                          ^
Language: C++

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

int main() {

	int N;
	vector<int> S(n);
	for (int i = 0; i < N; i++) {
		cin >> S.at(i);
	}
	int a = 0;
	int b = 0;
	int c = 0;
	int d = 0;
	for (int i = 0; i < N; i++) {
		if (S.at(i) == 'AC') {
			a++;
		}
		else if (S.at(i) == 'WA') {
			b++;
		}
		else if (S.at(i) == '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:18:32: warning: multi-character character constant [-Wmultichar]
   18 |                 if (S.at(i) == 'AC') {
      |                                ^~~~
a.cc:21:37: warning: multi-character character constant [-Wmultichar]
   21 |                 else if (S.at(i) == 'WA') {
      |                                     ^~~~
a.cc:24:37: warning: multi-character character constant [-Wmultichar]
   24 |                 else if (S.at(i) == 'TLE') {
      |                                     ^~~~~
a.cc: In function 'int main()':
a.cc:9:23: error: 'n' was not declared in this scope
    9 |         vector<int> S(n);
      |                       ^
a.cc:28:28: error: expected ';' before '}' token
   28 |                         d++
      |                            ^
      |                            ;
   29 |                 }
      |                 ~
Language: C++

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


Compiler output:
a.cc: In function 'int main()':
a.cc:14:9: error: 'AC' was not declared in this scope; did you mean 'ac'?
   14 |   cout<<AC<<" "<<"×"<<" "<<ac<<endl;
      |         ^~
      |         ac
a.cc:15:9: error: 'WA' was not declared in this scope; did you mean 'wa'?
   15 |   cout<<WA<<" "<<"×"<<" "<<wa<<endl;
      |         ^~
      |         wa
a.cc:16:9: error: 'TLE' was not declared in this scope
   16 |   cout<<TLE<<" "<<"×"<<" "<<tle<<endl;
      |         ^~~
a.cc:17:9: error: 'RE' was not declared in this scope; did you mean 're'?
   17 |   cout<<RE<<" "<<"×"<<" "<<re<<endl;
      |         ^~
      |         re
Language: C++

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


Compiler output:
a.cc: In function 'int main()':
a.cc:4:15: error: 'wa' was not declared in this scope
    4 |   int n, ac=0;wa=0, tle=0, re=0;
      |               ^~
a.cc:4:21: error: 'tle' was not declared in this scope
    4 |   int n, ac=0;wa=0, tle=0, re=0;
      |                     ^~~
a.cc:4:28: error: 're' was not declared in this scope
    4 |   int n, ac=0;wa=0, tle=0, re=0;
      |                            ^~
a.cc:14:9: error: 'AC' was not declared in this scope; did you mean 'ac'?
   14 |   cout<<AC<<" "<<"×"<<" "<<ac<<endl;
      |         ^~
      |         ac
a.cc:15:9: error: 'WA' was not declared in this scope
   15 |   cout<<WA<<" "<<"×"<<" "<<wa<<endl;
      |         ^~
a.cc:16:9: error: 'TLE' was not declared in this scope
   16 |   cout<<TLE<<" "<<"×"<<" "<<tle<<endl;
      |         ^~~
a.cc:17:9: error: 'RE' was not declared in this scope
   17 |   cout<<RE<<" "<<"×"<<" "<<re<<endl;
      |         ^~
Language: C++

int main() {

	int N;
	vector<int> S(n);
	for (int i = 0; i < N; i++) {
		cin >> S.at(i);
	}
	int a = 0;
	int b = 0;
	int c = 0;
	int d = 0;
	for (int i = 0; i < N; i++) {
		if (S.at(i) == 'AC') {
			a++;
		}
		else if (S.at(i) == 'WA') {
			b++;
		}
		else if (S.at(i) == '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:13:32: warning: multi-character character constant [-Wmultichar]
   13 |                 if (S.at(i) == 'AC') {
      |                                ^~~~
a.cc:16:37: warning: multi-character character constant [-Wmultichar]
   16 |                 else if (S.at(i) == 'WA') {
      |                                     ^~~~
a.cc:19:37: warning: multi-character character constant [-Wmultichar]
   19 |                 else if (S.at(i) == 'TLE') {
      |                                     ^~~~~
a.cc: In function 'int main()':
a.cc:4:9: error: 'vector' was not declared in this scope
    4 |         vector<int> S(n);
      |         ^~~~~~
a.cc:4:16: error: expected primary-expression before 'int'
    4 |         vector<int> S(n);
      |                ^~~
a.cc:6:17: error: 'cin' was not declared in this scope
    6 |                 cin >> S.at(i);
      |                 ^~~
a.cc:6:24: error: 'S' was not declared in this scope
    6 |                 cin >> S.at(i);
      |                        ^
a.cc:13:21: error: 'S' was not declared in this scope
   13 |                 if (S.at(i) == 'AC') {
      |                     ^
a.cc:23:28: error: expected ';' before '}' token
   23 |                         d++
      |                            ^
      |                            ;
   24 |                 }
      |                 ~           
a.cc:26:9: error: 'cout' was not declared in this scope
   26 |         cout << "AC x " << a << endl;
      |         ^~~~
a.cc:26:33: error: 'endl' was not declared in this scope
   26 |         cout << "AC x " << a << endl;
      |                                 ^~~~
Language: C++

#include<iostream>
#include <vector> 
#include <algorithm>
#include<iomanip>
#include<math.h>
#include<string>
#define SIZE_OF_ARRAY(array) (sizeof(array)/sizeof(array[0]))
using namespace std;
struct Room {
	int* a;
	int shortest;
	int way;
	int ways;
};
//for (int x = 0; x < N; x++)room[x].a=(int*)malloc(room[x].way * sizeof(int));
int main() {
	int N,a=0,b=0,c=0,d=0;
	static char szBuf[10] = { 0 };
	cin >> N;
	for (int x = 0; x < N; x++) {
		cin >> szBuf;
		if (!strcmp(szBuf ,"AC"))a++;
		if (!strcmp(szBuf ,"WA"))b++;
		if (!strcmp(szBuf ,"TLE"))c++;
		if (!strcmp(szBuf ,"RE"))d++;
	}
	cout << "AC x " << a << endl << "WA x " << b <<endl<< "TLE x " << c <<endl<< "RE x " << d<<endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:22: error: 'strcmp' was not declared in this scope
   22 |                 if (!strcmp(szBuf ,"AC"))a++;
      |                      ^~~~~~
a.cc:6:1: note: 'strcmp' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    5 | #include<math.h>
  +++ |+#include <cstring>
    6 | #include<string>
a.cc:23:22: error: 'strcmp' was not declared in this scope
   23 |                 if (!strcmp(szBuf ,"WA"))b++;
      |                      ^~~~~~
a.cc:23:22: note: 'strcmp' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
a.cc:24:22: error: 'strcmp' was not declared in this scope
   24 |                 if (!strcmp(szBuf ,"TLE"))c++;
      |                      ^~~~~~
a.cc:24:22: note: 'strcmp' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
a.cc:25:22: error: 'strcmp' was not declared in this scope
   25 |                 if (!strcmp(szBuf ,"RE"))d++;
      |                      ^~~~~~
a.cc:25:22: note: 'strcmp' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
Language: C++

#include<iostream>
using namespace std;
 
int main()
{
	string str={"AC","WA","TLE","RE"};
	int n;
	cin>>n;
	int ac=0,wa=0,tle=0,re=0;
	string s;
	for(int i=0;i<n;i++)
	{
		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:6:41: error: could not convert '{"AC", "WA", "TLE", "RE"}' from '<brace-enclosed initializer list>' to 'std::string' {aka 'std::__cxx11::basic_string<char>'}
    6 |         string str={"AC","WA","TLE","RE"};
      |                                         ^
      |                                         |
      |                                         <brace-enclosed initializer list>
Language: C++

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

int main() {
	int n;
	cin>>n;
	map<string> m;
	m["AC"]; m["WA"];m["TLE"];m["RE"];
	for(int i=0;i<n;i++){
	    string t;
	    getline(cin,t);
	    m[t]++;
	}
	cout<<"AC"<<" x "<<m["AC"];
	cout<<"WA"<<" x "<<m["WA"];
	cout<<"TLE"<<" x "<<m["TLE"];
	cout<<"RE"<<" x "<<m["RE"];
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:19: error: wrong number of template arguments (1, should be at least 2)
    7 |         map<string> m;
      |                   ^
In file included from /usr/include/c++/14/map:63,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:152,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_map.h:102:11: note: provided for 'template<class _Key, class _Tp, class _Compare, class _Alloc> class std::map'
  102 |     class map
      |           ^~~
a.cc:12:14: error: no match for 'operator[]' (operand types are 'int' and 'std::string' {aka 'std::__cxx11::basic_string<char>'})
   12 |             m[t]++;
      |              ^
Language: C++

#include <bits/stdc++.h>


int main()
{
  int n;
  std::cin >> n;
  enum JUDGE
  {
    AC = 0,
    WA,
    TLE,
    RE,
    COUNT
  };
  std::vector<int> sums(4, 0);
  for (int i = 0; i < n; ++i)
  {
    std::string s;
    std::cin >> s;

    if (s == std::string("AC"))
    {
      sums[AC]++;
    }
    else if (s == std::string("WA"))
    {
      sums[WA]++;
    }
    else if (s == std::string("TLE"))
    {
      sums[TLE]++;
    }
    else if (s == std::string("RE"))
    {
      sums[RE]++;
    }
  }
  std::cout << "AC x " << sums[JUDGE::AC] << std::endl;
  std::cout << "WA x " << sums[JUDGE::WA] << std::endl;
  std::cout << "TLE x " << sums[JUDGE::TLE] << std::endl;
  std::cout << "RE x " << sums[JUDGE::RE] << std::endl;
  
  return 0;

Compiler output:
a.cc: In function 'int main()':
a.cc:44:12: error: expected '}' at end of input
   44 |   return 0;
      |            ^
a.cc:5:1: note: to match this '{'
    5 | {
      | ^
Language: C++

#define pai 3.14159265358979323846
ll gcd(ll a, ll b){if (a%b == 0)  return(b);else  return(gcd(b, a%b));}
ll lcm(ll a, ll b){return a * b / gcd(a, b);}
/* map<string,int> */
/* 大文字を小文字に変換 tolower*/
/* 小文字を大文字に変換 toupper*/
/* 辞書順 next_permutation(a.begin(),a.end()) */
 
int main() {
    int n;
    cin >> n;
    map <string, int> a;
    string b;
    a["AC"] = 0;
    a["WA"] = 0;
    a["TLE"] = 0;
    a["RE"] = 0;
    rep(i,0,n) {
        cin >> b;
        if (b == "AC") {
            a["AC"]++;

        } else if (b == "WA"){
            a["WA"]++;

        } else if (b == "TLE") {
            a["TLE"]++;

        } else {
            a["RE"]++;

        }
    }
    cout << "AC x " << a["AC"] << endl;
    cout << "WA x " << a["WA"] << endl;
    cout << "TLE x " << a["TLE"] << endl;
    cout << "RE x " << a["RE"] << endl;
}

Compiler output:
a.cc:2:1: error: 'll' does not name a type
    2 | ll gcd(ll a, ll b){if (a%b == 0)  return(b);else  return(gcd(b, a%b));}
      | ^~
a.cc:3:1: error: 'll' does not name a type
    3 | ll lcm(ll a, ll b){return a * b / gcd(a, b);}
      | ^~
a.cc: In function 'int main()':
a.cc:11:5: error: 'cin' was not declared in this scope
   11 |     cin >> n;
      |     ^~~
a.cc:12:5: error: 'map' was not declared in this scope
   12 |     map <string, int> a;
      |     ^~~
a.cc:12:10: error: 'string' was not declared in this scope
   12 |     map <string, int> a;
      |          ^~~~~~
a.cc:12:18: error: expected primary-expression before 'int'
   12 |     map <string, int> a;
      |                  ^~~
a.cc:13:11: error: expected ';' before 'b'
   13 |     string b;
      |           ^~
      |           ;
a.cc:14:5: error: 'a' was not declared in this scope
   14 |     a["AC"] = 0;
      |     ^
a.cc:18:9: error: 'i' was not declared in this scope
   18 |     rep(i,0,n) {
      |         ^
a.cc:18:5: error: 'rep' was not declared in this scope
   18 |     rep(i,0,n) {
      |     ^~~
a.cc:34:5: error: 'cout' was not declared in this scope
   34 |     cout << "AC x " << a["AC"] << endl;
      |     ^~~~
a.cc:34:35: error: 'endl' was not declared in this scope
   34 |     cout << "AC x " << a["AC"] << endl;
      |                                   ^~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int sum[5];
char c[21];
int main()
{
	int n,i;
    scanf("%d\n",&n); 
    for(i=1;i<=n;i++)
    {
    	gets(c);
    	if(c[0]=='A'&&c[1]=='C')sum[1]++;
    	else if(c[0]=='W'&&c[1]=='A')sum[2]++;
    	else if(c[0]=='T'&&c[1]=='L'&&c[2]=='E')sum[3]++;
    	else if(c[0]=='R'&&c[1]=='E')sum[4]++;
	}
	printf("AC x %d\n",sum[1]);
	printf("WA x %d\n",sum[2]);
	printf("TLE x %d\n",sum[3]);
	printf("RE x %d",sum[4]);
	
} 

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

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define all(v) v.begin(),v.end()

int main() {
  int n;
  cin >> n;
  vector<int> a(n);
  for(int i=0;i<n;i++){
  	cin >> a[i];
  }
  int ac=0,wa=0,tle=0,re=0;
  for(int i=0;i<n;i++){
    if(a[i]=="AC")ac++;
    if(a[i]=="WA")wa++;
    if(a[i]=="TLE")tle++;
    if(a[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:15:12: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   15 |     if(a[i]=="AC")ac++;
a.cc:16:12: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   16 |     if(a[i]=="WA")wa++;
a.cc:17:12: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   17 |     if(a[i]=="TLE")tle++;
a.cc:18:12: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   18 |     if(a[i]=="RE")re++;
Language: C++

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

void solve() {
    int t; cin>>t;
    int a = 0, b=0, c=0, d=0;
    rep(i, 0, n) {
        string s; 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 << "\n";  

}

int main() {
    int t = 1; //scanf("%d", &t);
    while(t--) {
        solve();
    }
    return 0;
}


Compiler output:
a.cc: In function 'void solve()':
a.cc:9:15: error: 'n' was not declared in this scope
    9 |     rep(i, 0, n) {
      |               ^
a.cc:4:37: note: in definition of macro 'rep'
    4 | #define rep(i, a, n) for(int i=a; i<n; ++i)
      |                                     ^
Language: Java

import java.io.BufferedWriter;
import java.io.IOException;
import java.io.OutputStreamWriter;
import java.util.Scanner;

public class Main {
	public static void main(String[] args) throws IOException{
		Scanner scanner = new Scanner(Sytem.in);
		int cases = scanner.nextInt();
		BufferedWriter log = new BufferedWriter(new OutputStreamWriter(System.out));
		int ac = 0;
		int wa = 0;
		int tle = 0;
		int re = 0;
		for(int i = 0; i < cases; i++) {
			String temp = scanner.next();
			if(temp.equals("AC"))
				ac++;
			else if(temp.equals("WA"))
				wa++;
			else if(temp.equals("TLE"))
				tle++;
			else
				re++;
		}
		log.write("AC * " + ac + "\n");
		log.write("WA * " + wa + "\n");
		log.write("TLE * " + tle + "\n");
		log.write("RE * " + re + "\n");
		log.flush();
	}
}


Compiler output:
Main.java:8: error: cannot find symbol
		Scanner scanner = new Scanner(Sytem.in);
		                              ^
  symbol:   variable Sytem
  location: class Main
1 error
Language: C++

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

int main() {
  int n;
  cin >> n;
  int ac = 0, wa = 0, tle = 0, re = 0;
  for (int i = 0; i < n; i++) {
    string s;
    cin >> s;
    switch (s) {
      case "AC":
        ac++;
        break;
      case "WA":
        wa++;
        break;
      case "TLE":
        tle++;
        break;
      case "RE":
        re++;
        break;
    }
  }
  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:11:13: error: switch quantity not an integer
   11 |     switch (s) {
      |             ^
Language: C++

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

#define ll long long
#define F first
#define S second
#define pb push_back
#define endl "\n"
#define all(v) (v).begin(),(v).end()

typedef pair<ll,ll> pi;

void solve()
{
    ll n,i,j,k,x,y,z;
    ll ac=0,wa=0,tle=0,re=0;
    cin>>n;
    for(i=0;i<n;i++)
    {
    	string s;
    	cin>>s;
    	is(s=="AC")
    	{
    		ac++;
		}
		else if(s=="WA")
		{
			wa++;
		}
		else if(s=="TLE")
		{
			tle++;
		}
		else
		{
			re++;
		}
	}
	cout<<"AC x "<<ac<<endl;
	cout<<"WA x "<<wa<<endl;
	cout<<"TLE x "<<tle<<endl;
	cout<<"RE x "<<re<<endl;
	
}

int main() {
	// your code goes here
	int t=1;
	//cin>>t;
	while(t--)
	{
	    solve();
	}
	return 0;
}



Compiler output:
a.cc: In function 'void solve()':
a.cc:22:9: error: 'is' was not declared in this scope; did you mean 's'?
   22 |         is(s=="AC")
      |         ^~
      |         s
a.cc:26:17: error: 'else' without a previous 'if'
   26 |                 else if(s=="WA")
      |                 ^~~~
Language: C++

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

int main() {
  int n;
  cin>>n;
  vector<string> s(n);
  for(int i=0;i<n;i++){
    cin>>s.at(i);
  }
  int a=0;
  int b=0;
  int c=0;
  int d=0;
  for(int i=0;i<n;i++){
    if(i=="AC"){
      a++;
    }
  }
  for(int i=0;i<n;i++){
    if(i=="WA"){
      b++;
    }
  }
  for(int i=0;i<n;i++){
    if(i=="TLE"){
      c++;
    }
  }
  for(int i=0;i<n;i++){
    if(i=="RE"){
      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: In function 'int main()':
a.cc:16:9: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   16 |     if(i=="AC"){
      |        ~^~~~~~
a.cc:21:9: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   21 |     if(i=="WA"){
      |        ~^~~~~~
a.cc:26:9: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   26 |     if(i=="TLE"){
      |        ~^~~~~~~
a.cc:31:9: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   31 |     if(i=="RE"){
      |        ~^~~~~~
Language: C++

    printf("RE x %d\n", re);
#include "bits/stdc++.h"
constexpr auto MAX = 10E9+1;
using namespace std;
using ll = long long;
using VI = vector<int>;

int main()
{
    int n;
    cin >> n;
    int ac = 0, wa = 0, tle = 0, re = 0;
    for (int i = 0; i < n; i++) {
        string s = "";
        cin >> s;
        if (s == "AC") ac++;
        else if (s == "TLE") tle++;
        else if (s == "WA") wa++;
        else if (s == "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);

    return 0;
}


Compiler output:
a.cc:1:11: error: expected constructor, destructor, or type conversion before '(' token
    1 |     printf("RE x %d\n", re);
      |           ^
Language: C++

#include <bits/stdc++.h>
#define mod 1000000007
#define ll long long int
#define fastio ios_base::sync_with_stdio(false);cin.tie(NULL);
using namespace std;

bool isPrime(ll n) 
{ 
    if (n <= 1)  return false; 
    if (n <= 3)  return true; 
  
    if (n%2 == 0 || n%3 == 0) return false; 
  
    for (int i=5; i*i<=n; i=i+6) 
        if (n%i == 0 || n%(i+2) == 0) 
           return false; 
    return true; 
} 

ll power(ll x,ll y) 
{ 
	if(x == 0) 
        return 0; 
    if (y == 0) 
        return 1; 
    else if (y % 2 == 0) 
        return power(x, y / 2) * power(x, y / 2); 
    else
        return x * power(x, y / 2) * power(x, y / 2); 
} 

int main()
{
	#ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
	#endif

    fastio
    ll t, i, j, n;
    cin>>n;
    string s;

    map<string, int> mp;
    for(i=0; i<n; i++)
    {
    	cin>>s;
    	mp[s]++;
    }
    cout<<"AC x "<<mp[AC]<<"\n";
    cout<<"WA x "<<mp[WA]<<"\n";
    cout<<"TLE x "<<mp[TLE]<<"\n";
    cout<<"RE x "<<mp[RE]<<"\n";
}

Compiler output:
a.cc: In function 'int main()':
a.cc:50:23: error: 'AC' was not declared in this scope
   50 |     cout<<"AC x "<<mp[AC]<<"\n";
      |                       ^~
a.cc:51:23: error: 'WA' was not declared in this scope
   51 |     cout<<"WA x "<<mp[WA]<<"\n";
      |                       ^~
a.cc:52:24: error: 'TLE' was not declared in this scope
   52 |     cout<<"TLE x "<<mp[TLE]<<"\n";
      |                        ^~~
a.cc:53:23: error: 'RE' was not declared in this scope
   53 |     cout<<"RE x "<<mp[RE]<<"\n";
      |                       ^~
Language: C++

#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp> 
#include <ext/pb_ds/tree_policy.hpp> 
#include <functional>
using namespace __gnu_pbds;  
using namespace std;



typedef tree<long long, null_type, less<long long>, rb_tree_tag, 
             tree_order_statistics_node_update> 
    new_data_set; 
    
    
    
//defines
typedef long long ll;
typedef long double ld;
ll a,b,c,n,m,k,t=1;

void solve()
{
    map<string>f;
    cin>>n;
    string s;
    while(n--)
    {
        cin>>s;
        f[s]++;
    }
    cout<<"AC x "<<f["AC"]<<"\n";
    cout<<"WA x "<<f["WA"]<<"\n";
    cout<<"TLE x "<<f["TLE"]<<"\n";
    cout<<"RE x "<<f["RE"]<<"\n";
 
}

int32_t main()
{
#ifdef ONPC
    freopen("input.txt", "r", stdin);
#endif
    ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);

  //cin>>t;
    while(t--)
    {
        solve();
    }
  //cout<<sum;
        
    return 0;
}

Compiler output:
a.cc: In function 'void solve()':
a.cc:23:15: error: wrong number of template arguments (1, should be at least 2)
   23 |     map<string>f;
      |               ^
In file included from /usr/include/c++/14/map:63,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:152,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_map.h:102:11: note: provided for 'template<class _Key, class _Tp, class _Compare, class _Alloc> class std::map'
  102 |     class map
      |           ^~~
a.cc:29:10: error: no match for 'operator[]' (operand types are 'int' and 'std::string' {aka 'std::__cxx11::basic_string<char>'})
   29 |         f[s]++;
      |          ^
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:20:3: error: 'cou' was not declared in this scope; did you mean 'cos'?
   20 |   cou<<"RE x "<<R<<endl;
      |   ^~~
      |   cos
Language: C++

#include <bits/stdc++.h>
using namespace std;
using ll=long long;
using vl = vector<ll>; using vvl = vector<vl>;
#define FOR(i,a,b) for(ll i=a;i<b;i++)
#define rep(i,n) FOR(i,0,n)
const ll INF = 9223372036854775807;

int main() {
  int n;cin >> n;
  int a = 0;
  int b = 0;
  int c = 0;
  int d = 0;
  rep(i,n) {
    string s;cin >> s;
    if(s == "AC") a++;
    if(s == "WA") b++;
    if(s == "TLE") c++;
    if(s == "RE") 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: In function 'int main()':
a.cc:22:26: error: 'x' was not declared in this scope
   22 |   cout << "AC" << " " << x << " " << a << endl;
      |                          ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main (){
  int N;cin >> N;
  map<string,int>m;
  for(int i=1;i<=N;i+=1){
    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;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:18: error: 'M' was not declared in this scope
   10 |   cout<<"AC x "<<M["AC"]<<endl;
      |                  ^
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:17:18: error: could not convert '(& s.std::vector<std::__cxx11::basic_string<char> >::operator[](((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'
   17 |     }else if(s[i]="TLE"){
a.cc:19:18: error: could not convert '(& s.std::vector<std::__cxx11::basic_string<char> >::operator[](((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'
   19 |     }else if(s[i]="RE"){
Language: C++

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

int main() {
  int n;
  cin>>n;
  vector<int> s(n);
  for(int i=0;i<n;i++){
    cin>>s.at(i);
  }
  int a=0;
  int b=0;
  int c=0;
  int d=0;
  for(int i=0;i<n;i++){
    if(i=="AC"){
      a++;
    }
  }
  for(int i=0;i<n;i++){
    if(i=="WA"){
      b++;
    }
  }
  for(int i=0;i<n;i++){
    if(i=="TLE"){
      c++;
    }
  }
  for(int i=0;i<n;i++){
    if(i=="RE"){
      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: In function 'int main()':
a.cc:16:9: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   16 |     if(i=="AC"){
      |        ~^~~~~~
a.cc:21:9: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   21 |     if(i=="WA"){
      |        ~^~~~~~
a.cc:26:9: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   26 |     if(i=="TLE"){
      |        ~^~~~~~~
a.cc:31:9: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   31 |     if(i=="RE"){
      |        ~^~~~~~
Language: C++

	#include <bits/stdc++.h>
	#define ll long long
	#define f(i,a,b) for(ll i=a;i<b;i++)
	#define fi(i,a,b) for(ll i=b;i>=a;i--)
	using namespace std;
	ll mod(ll a)
	{
	if(a>0)
	return a;
	else
	return -a;
	}
	ll min(ll a,ll b)
	{
	if(a>b)
	return b;
	else
	return a;
	}
	ll gcd(ll a, ll b)
	{
	    if (b == 0)
	        return a;
	    return gcd(b, a % b);

	}
	ll max(ll a,ll b)
	{
	if(a<b)
	return b;
	else
	return a;
	}
	int main()
	{

	ll max=0,i1,n,n1,n2,i,w,j,l=0,k=0,c0=0,c1=0,c2=0,c3=0,m,t,gcd1;
	cin>>t;
	string s1,s2;
	for(i1=0;i1<t;i1++)
	{
	cin>>s1;
	if(s1=="TLE")
	c2++;
	if(s1=="AC")
	c0++;
	if(s2=="WA")
	c1++;
	if(s3=="RE")
	c3++;
	}
	cout<<"AC X "<<c0<<endl<<"WA X "<<c1<<endl<<"TLE X "<<c2<<endl<<"RE X "<<c3;
	return 0;
	}


Compiler output:
a.cc: In function 'int main()':
a.cc:49:12: error: 's3' was not declared in this scope; did you mean 's2'?
   49 |         if(s3=="RE")
      |            ^~
      |            s2
Language: C++

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

void solve() {
    int t; cin>>t;
    int a = 0, b=0, c=0, d=0;
    rep(i, 0, n) {
        string s; 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 << "\n";  

}

int main() {
    int t = 1; //scanf("%d", &t);
    while(t--) {
        solve();
    }
    return 0;
}


Compiler output:
a.cc: In function 'void solve()':
a.cc:9:15: error: 'n' was not declared in this scope
    9 |     rep(i, 0, n) {
      |               ^
a.cc:4:40: note: in definition of macro 'rep'
    4 | #define rep(i, a, n) for(int i = a; i< n; i++)
      |                                        ^
Language: C++

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

int main() {
  int n;
  cin>>n;
  vector<int> s(n);
  for(int i=0;i<n;i;;){
    cin>>s.at(i);
  }
  int a=0;
  int b=0;
  int c=0;
  int d=0;
  for(int i=0;i<n;i++){
    if(i=="AC"){
      a++;
    }
  }
  for(int i=0;i<n;i++){
    if(i=="WA"){
      b++;
    }
  }
  for(int i=0;i<n;i++){
    if(i=="TLE"){
      c++;
    }
  }
  for(int i=0;i<n;i++){
    if(i=="RE"){
      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: In function 'int main()':
a.cc:8:20: error: expected ')' before ';' token
    8 |   for(int i=0;i<n;i;;){
      |      ~             ^
      |                    )
a.cc:8:22: error: expected primary-expression before ')' token
    8 |   for(int i=0;i<n;i;;){
      |                      ^
a.cc:16:9: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   16 |     if(i=="AC"){
      |        ~^~~~~~
a.cc:21:9: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   21 |     if(i=="WA"){
      |        ~^~~~~~
a.cc:26:9: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   26 |     if(i=="TLE"){
      |        ~^~~~~~~
a.cc:31:9: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   31 |     if(i=="RE"){
      |        ~^~~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main () {
  int N;
  cin >> N;
  string jud[] = {"AC", "WA", "TLE", "RE"};
  int n_jud[] = {0, 0, 0, 0};
  for (int i = 0; i < N; i ++) {
    strig S;
    cin >> S;
    for (int j = 0; j < 4; j ++) {
      if (jud[j] == S) {
        n_jud[j] ++;
      }
    }
  }
  for (int i = 0; i < 4; i ++) {
    cout << jud[i] << " x " << n_jud[i] << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:5: error: 'strig' was not declared in this scope
    9 |     strig S;
      |     ^~~~~
a.cc:10:12: error: 'S' was not declared in this scope
   10 |     cin >> S;
      |            ^
Language: C++

#include<bits/stdc++.h>
#define rep(i, x, n) for(int i = x; i < n; i++)
#define repr(i, x, n) for(int i = x; i > n; i--)
#define pii pair<int,int>
#define ll long long
const long long iinf = 1e18;
const int inf = 1e9;
const int MOD = (1e6+3);
int dir4[4][2] = {{1,0},{-1,0},{0,1},{0,-1}};
int knight[8][2] = {{2,1},{2,-1},{-2,1},{-2,-1},{1,2},{-1,2},{1,-2},{-1,-2}};

using namespace std;

void solve()
{
    int n; cin >> n;
    map<string, n> mp;
    for(int i = 1; i <= n; i++){
        string s; cin >> s;
        mp[s]++;
    }
    cout << "AC x " << mp["AC"] << "\n";
    cout << "WA x " << mp["WA"] << "\n";
    cout << "TLE x " << mp["TLE"] << "\n";
    cout << "RE x " << mp["RE"] << "\n";
    
}
//new line is printed in main()

int main()
{
    int t = 1;
        // cin >> t; // comment out if no test case is required
    int i = 1;
    while(t--){
        //cout << "Case " << i++ << ": ";
        solve();
        // printf("\n");
    }
    return 0;
}


Compiler output:
a.cc: In function 'void solve()':
a.cc:17:18: error: type/value mismatch at argument 2 in template parameter list for 'template<class _Key, class _Tp, class _Compare, class _Alloc> class std::map'
   17 |     map<string, n> mp;
      |                  ^
a.cc:17:18: note:   expected a type, got 'n'
a.cc:17:18: error: template argument 4 is invalid
a.cc:20:11: error: no match for 'operator[]' (operand types are 'int' and 'std::string' {aka 'std::__cxx11::basic_string<char>'})
   20 |         mp[s]++;
      |           ^
Language: C++

#include<cstdio>

int N,a,b,c,d;
char s[10];
int main(){
    scanf("%d",&N);
    for(int i = 1; i <= N; ++i){
        scanf("%s",s);
        if(a[0] == 'A') ++a;
        else if(a[0] == 'W')    ++b;
        else if(a[0] == 'T')    ++c;
        else    ++d;
    }
    printf("AC x %d\n",a);
    printf("WA x %d\n",b);
    printf("TLE x %d\n",c);
    printf("RE x %d\n",d);
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:13: error: invalid types 'int[int]' for array subscript
    9 |         if(a[0] == 'A') ++a;
      |             ^
a.cc:10:18: error: invalid types 'int[int]' for array subscript
   10 |         else if(a[0] == 'W')    ++b;
      |                  ^
a.cc:11:18: error: invalid types 'int[int]' for array subscript
   11 |         else if(a[0] == 'T')    ++c;
      |                  ^
Language: C++

#include<iostream>
using namespace std;
int main(){
  int n;
  cin>>n;
  string s;
  int a=0,b=0,c=0,d=0;
  for(int i=0;i<n;i++){
    cin>>s;
    if(s=="AC") a++;
    if(s=="WA") b++;
    if(s=="TLE") c++;
    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:15:20: error: 'x' was not declared in this scope
   15 |   cout<<"AC"<<" "<<x<<" "<<a<<endl;
      |                    ^