stablegradients/pie-gem5-pairs huggingface dataset:
// Slower C++ solution:
#include <bits/stdc++.h>



using namespace std;

const int MAXN = 1e5 + 5;



int a, b, c, d;

char str[500];



int main(int argc, char* argv[]) {

    int T;

    scanf("%d", &T);

    while (T--) {

        scanf("%s", str);

        if (str[0] == 'A')

            a++;

        else if (str[0] == 'W')

            b++;

        else if (str[0] == 'T')

            c++;

        else if (str[0] == 'R')

            d++;

    }

    printf("AC x %d\nWA x %d\nTLE x %d\nRE x %d\n", a, b, c, d);

    return 0;

}

// Faster C++ solution for the same problem (measured speedup: 5.132486597045698x):
#include<stdio.h>



int main(){

	int n, ac = 0, wa = 0, tle = 0, re = 0;

	char str[10];

	scanf("%d", &n);

	for(int i = 0; i < n; i++){

		scanf("%s", str);

		if(str[0] == 'A'){

			ac++;

		}

		if(str[0] == 'W'){

			wa++;

		}

		if(str[0] == 'T'){

			tle++;

		}

		if(str[0] == 'R'){

			re++;

		}

	}

	printf("AC x %d\n", ac);

	printf("WA x %d\n", wa);

	printf("TLE x %d\n", tle);

	printf("RE x %d\n", re);

	return 0;

}
// Slower C++ solution:
#include <iostream>

#include <cmath>



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++;

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

        c1++;

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

        c2++;

    else 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;

}

// Faster C++ solution for the same problem (measured speedup: 5.252524798726224x):
#include<stdio.h>



int main(){

	int n, ac = 0, wa = 0, tle = 0, re = 0;

	char str[10];

	scanf("%d", &n);

	for(int i = 0; i < n; i++){

		scanf("%s", str);

		if(str[0] == 'A'){

			ac++;

		}

		if(str[0] == 'W'){

			wa++;

		}

		if(str[0] == 'T'){

			tle++;

		}

		if(str[0] == 'R'){

			re++;

		}

	}

	printf("AC x %d\n", ac);

	printf("WA x %d\n", wa);

	printf("TLE x %d\n", tle);

	printf("RE x %d\n", re);

	return 0;

}
// Slower C++ solution:
#include <iostream>

using namespace std;

int main()

{

	int n, b =0, c = 0,d = 0,e = 0;

	string a;

	cin >> n;

	for (int i = 0; i < n; i++) {

		cin >> a;

		if (a[0] == 'A')

			b++;

		else if (a[0] == 'T' )

			c++;

		else if (a[0] == 'W')

			d++;

		else {

			e++;

		}

	}cout << "AC x "<< b << endl;

	cout << "WA x " << d << endl;

	cout << "TLE x " << c << endl;

	cout << "RE x "<< e << endl;

	

	return 0;

}

// Faster C++ solution for the same problem (measured speedup: 5.202274227005322x):
#include<stdio.h>



int main(){

	int n, ac = 0, wa = 0, tle = 0, re = 0;

	char str[10];

	scanf("%d", &n);

	for(int i = 0; i < n; i++){

		scanf("%s", str);

		if(str[0] == 'A'){

			ac++;

		}

		if(str[0] == 'W'){

			wa++;

		}

		if(str[0] == 'T'){

			tle++;

		}

		if(str[0] == 'R'){

			re++;

		}

	}

	printf("AC x %d\n", ac);

	printf("WA x %d\n", wa);

	printf("TLE x %d\n", tle);

	printf("RE x %d\n", re);

	return 0;

}
// Slower C++ solution:
//#include<bits/stdc++.h>

#include<iostream>

#include<iomanip>

#include<string>

#include<cmath>

#include<algorithm>

#include<vector>

#include<stack>

#include<queue>

#include<deque>

#include<set>

#include<map>

#include<bitset>

#define sz(v) (int)v.size()

#define ll long long

#define ull unsigned long long

using namespace std;

const int PI = 3.14159265;

void fast() {

	std::ios_base::sync_with_stdio(0);

	cin.tie(0);cout.tie(0);

}

int main()

{

	//freopen("file.in","r",stdin);

	//freopen("file.out","w",stdout);

	fast();



	int t;

	cin >> t;

	int wa = 0, tle = 0, re = 0, ac = 0;

	while (t--)

	{

		string s;

		cin >> s;

		if (s == "WA") {

			wa++;

		}

		else if (s == "TLE") {

			tle++;

		}

		else if (s == "RE") {

			re++;

		}

		else {

			ac++;

		}

	}

	cout << "AC x " << ac << '\n';

	cout << "WA x " << wa << '\n';

	cout << "TLE x " << tle << '\n';

	cout << "RE x " << re << '\n';



	return 0;

}


// Faster C++ solution for the same problem (measured speedup: 5.312051403191975x):
#include<stdio.h>



int main(){

	int n, ac = 0, wa = 0, tle = 0, re = 0;

	char str[10];

	scanf("%d", &n);

	for(int i = 0; i < n; i++){

		scanf("%s", str);

		if(str[0] == 'A'){

			ac++;

		}

		if(str[0] == 'W'){

			wa++;

		}

		if(str[0] == 'T'){

			tle++;

		}

		if(str[0] == 'R'){

			re++;

		}

	}

	printf("AC x %d\n", ac);

	printf("WA x %d\n", wa);

	printf("TLE x %d\n", tle);

	printf("RE x %d\n", re);

	return 0;

}
// Slower C++ solution:
#include <iostream>

#include<math.h>

#include<algorithm>

#include<map>

using namespace std;



int main()

{

    map<string, int>freq;

    int n;

    string val;

    cin >> n;



    for (int i = 0;i < n;i++) {

        cin >> val;

        freq[val] += 1;

    }



    cout << "AC x " << freq["AC"]<<endl;

    cout << "WA x " << freq["WA"]<<endl;

    cout << "TLE x " << freq["TLE"]<<endl;

    cout << "RE x " << freq["RE"]<<endl;

    return 0;

}


// Faster C++ solution for the same problem (measured speedup: 5.271409703845191x):
#include<stdio.h>



int main(){

	int n, ac = 0, wa = 0, tle = 0, re = 0;

	char str[10];

	scanf("%d", &n);

	for(int i = 0; i < n; i++){

		scanf("%s", str);

		if(str[0] == 'A'){

			ac++;

		}

		if(str[0] == 'W'){

			wa++;

		}

		if(str[0] == 'T'){

			tle++;

		}

		if(str[0] == 'R'){

			re++;

		}

	}

	printf("AC x %d\n", ac);

	printf("WA x %d\n", wa);

	printf("TLE x %d\n", tle);

	printf("RE x %d\n", re);

	return 0;

}
// Slower C++ solution:
#include<iostream>

#include<algorithm>

using namespace std;

int main()

{

    int n;

    cin >> n;

    string a[n];

    string b[] = {"AC","WA","TLE","RE"};

    int x1=0,x2=0,x3=0,x4=0;

    for (int i = 0 ; i < n ; i++){

        cin >> a[i];

        if (a[i]==b[0]) {x1++;}

        else if (a[i]==b[1]) {x2++;}

        else if (a[i]==b[2]) {x3++;}

        else if (a[i]==b[3]) {x4++;}

    }

    cout<<"AC x "<<x1<<endl;

    cout<<"WA x "<<x2<<endl;

    cout<<"TLE x "<<x3<<endl;

    cout<<"RE x "<<x4<<endl;





    return 0;

}




// Faster C++ solution for the same problem (measured speedup: 5.250967843537356x):
#include<stdio.h>



int main(){

	int n, ac = 0, wa = 0, tle = 0, re = 0;

	char str[10];

	scanf("%d", &n);

	for(int i = 0; i < n; i++){

		scanf("%s", str);

		if(str[0] == 'A'){

			ac++;

		}

		if(str[0] == 'W'){

			wa++;

		}

		if(str[0] == 'T'){

			tle++;

		}

		if(str[0] == 'R'){

			re++;

		}

	}

	printf("AC x %d\n", ac);

	printf("WA x %d\n", wa);

	printf("TLE x %d\n", tle);

	printf("RE x %d\n", re);

	return 0;

}
// Slower C++ solution:
#include <iostream>

using namespace std;

int main()

{

    long long n;

    cin >> n;

    string s;

    int ac=0,wa=0,tle=0,re=0;

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

    {

        cin >> s;

        if (s=="AC")

            ac++;

        else if (s=="WA")

            wa++;

        else if (s== "TLE")

            tle++;

        else

            re++;



    }



    cout <<"AC x " << ac << "\nWA x " << wa

    << "\nTLE x " << tle << "\nRE x "<< re;



return 0;

}


// Faster C++ solution for the same problem (measured speedup: 5.241901465943598x):
#include<stdio.h>



int main(){

	int n, ac = 0, wa = 0, tle = 0, re = 0;

	char str[10];

	scanf("%d", &n);

	for(int i = 0; i < n; i++){

		scanf("%s", str);

		if(str[0] == 'A'){

			ac++;

		}

		if(str[0] == 'W'){

			wa++;

		}

		if(str[0] == 'T'){

			tle++;

		}

		if(str[0] == 'R'){

			re++;

		}

	}

	printf("AC x %d\n", ac);

	printf("WA x %d\n", wa);

	printf("TLE x %d\n", tle);

	printf("RE x %d\n", re);

	return 0;

}
// Slower C++ solution:
#include <iostream>

using namespace std;



int main()

{

	int n;

	string val;

	cin >> n;

	int count[4] = { 0 };

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

	{

		cin >> val;

		switch (val[0])

		{

		case 'A':

			count[0]++;

			break;

		case 'W':

			count[1]++;

			break;

		case 'T':

			count[2]++;

			break;

		case 'R':

			count[3]++;

			break;

		default:

			break;

		}

	}

	cout << "AC x " << count[0] << "\nWA x " << count[1] << "\nTLE x " << count[2] << "\nRE x " << count[3] << "\n";



	ios::sync_with_stdio(false);

	cin.tie();

	cout.tie();

	return 0;

}

// Faster C++ solution for the same problem (measured speedup: 5.315905869667923x):
#include<stdio.h>



int main(){

	int n, ac = 0, wa = 0, tle = 0, re = 0;

	char str[10];

	scanf("%d", &n);

	for(int i = 0; i < n; i++){

		scanf("%s", str);

		if(str[0] == 'A'){

			ac++;

		}

		if(str[0] == 'W'){

			wa++;

		}

		if(str[0] == 'T'){

			tle++;

		}

		if(str[0] == 'R'){

			re++;

		}

	}

	printf("AC x %d\n", ac);

	printf("WA x %d\n", wa);

	printf("TLE x %d\n", tle);

	printf("RE x %d\n", re);

	return 0;

}
// Slower C++ solution:
#include<iostream>

#include<algorithm>

#include<math.h>

 #define ll long long

using namespace std;

int main()

{

	int co1=0, co2=0, co3=0, co4=0;

    string s; int t; cin >> t;

	while (t--)

	{

		cin >> s;

		if (s == "AC")

			co1++;

		else if (s == "WA")

			co2++;

		else if (s == "TLE")

			co3++;

		else {

			co4++;

		}

		

	}

	cout << "AC x " << co1 << endl;

	cout << "WA x " << co2 << endl;

	cout << "TLE x " << co3 << endl;

	cout << "RE x " << co4 << endl;

}

// Faster C++ solution for the same problem (measured speedup: 5.251845593328908x):
#include<stdio.h>



int main(){

	int n, ac = 0, wa = 0, tle = 0, re = 0;

	char str[10];

	scanf("%d", &n);

	for(int i = 0; i < n; i++){

		scanf("%s", str);

		if(str[0] == 'A'){

			ac++;

		}

		if(str[0] == 'W'){

			wa++;

		}

		if(str[0] == 'T'){

			tle++;

		}

		if(str[0] == 'R'){

			re++;

		}

	}

	printf("AC x %d\n", ac);

	printf("WA x %d\n", wa);

	printf("TLE x %d\n", tle);

	printf("RE x %d\n", re);

	return 0;

}
// Slower C++ solution:
#include<bits/stdc++.h>

using namespace std;

#define endl "\n"

#define goat() ios_base::sync_with_stdio(0);cout.tie(0);cin.tie(0);srand(time(NULL))

typedef long long ll;

int a[1005]; int b[1005];

int main() {

	goat();

	int n, m, i;

	int ac = 0, wa = 0, tle = 0, re = 0;

	cin >> n;

	for (i = 0; i < n; i++) {

		string s;

		cin >> s;

		if (s == "AC") {

			ac++;

		}

		else if (s == "TLE") {

			tle++;

		}

		else if (s=="WA") {

			wa++;

		}

		else {

			re++;

		}

	}

	cout << "AC" << " x " << ac << endl;

	cout << "WA" << " x " << wa << endl;

	cout << "TLE" << " x " << tle << endl;

	cout << "RE" << " x " << re << endl;

	

}

// Faster C++ solution for the same problem (measured speedup: 5.31844057146004x):
#include<stdio.h>



int main(){

	int n, ac = 0, wa = 0, tle = 0, re = 0;

	char str[10];

	scanf("%d", &n);

	for(int i = 0; i < n; i++){

		scanf("%s", str);

		if(str[0] == 'A'){

			ac++;

		}

		if(str[0] == 'W'){

			wa++;

		}

		if(str[0] == 'T'){

			tle++;

		}

		if(str[0] == 'R'){

			re++;

		}

	}

	printf("AC x %d\n", ac);

	printf("WA x %d\n", wa);

	printf("TLE x %d\n", tle);

	printf("RE x %d\n", re);

	return 0;

}
// Slower C++ solution:
#include <bits/stdc++.h>

using namespace std;

int main()

{

int n=0,c_AC=0,c_WA=0,c_TLE=0,c_RE=0;

cin>>n;

while (n>0)

{

    string s;

    cin>>s;

    if ( s[0]=='A'){c_AC++;}

    if ( s[0]=='W'){c_WA++;}

    if ( s[0]=='T'){c_TLE++;}

    if ( s[0]=='R'){c_RE++;}

    n--;

}

cout<<"AC x "<<c_AC<<endl;

cout<<"WA x "<<c_WA<<endl;

cout<<"TLE x "<<c_TLE<<endl;

cout<<"RE x "<<c_RE<<endl;

}

// Faster C++ solution for the same problem (measured speedup: 5.2431255815031985x):
#include<stdio.h>



int main(){

	int n, ac = 0, wa = 0, tle = 0, re = 0;

	char str[10];

	scanf("%d", &n);

	for(int i = 0; i < n; i++){

		scanf("%s", str);

		if(str[0] == 'A'){

			ac++;

		}

		if(str[0] == 'W'){

			wa++;

		}

		if(str[0] == 'T'){

			tle++;

		}

		if(str[0] == 'R'){

			re++;

		}

	}

	printf("AC x %d\n", ac);

	printf("WA x %d\n", wa);

	printf("TLE x %d\n", tle);

	printf("RE x %d\n", re);

	return 0;

}
// Slower C++ solution:
#include <iostream>



using namespace std;



int main()

{



    int test;   cin >> test;

    int AC = 0, WA = 0, TLE = 0, RE = 0;



    string stat;

    for (int i = 0; i < test; i++){



        cin >> stat;

        if (stat == "AC"){AC++;}

        if (stat == "WA"){WA++;}

        if (stat == "TLE"){TLE++;}

        if (stat == "RE"){RE++;}

    }



    cout << "AC x " << AC << endl;

    cout << "WA x " << WA << endl;

    cout << "TLE x " << TLE << endl;

    cout << "RE x " << RE << endl;



    return 0;

}


// Faster C++ solution for the same problem (measured speedup: 5.252239783659072x):
#include<stdio.h>



int main(){

	int n, ac = 0, wa = 0, tle = 0, re = 0;

	char str[10];

	scanf("%d", &n);

	for(int i = 0; i < n; i++){

		scanf("%s", str);

		if(str[0] == 'A'){

			ac++;

		}

		if(str[0] == 'W'){

			wa++;

		}

		if(str[0] == 'T'){

			tle++;

		}

		if(str[0] == 'R'){

			re++;

		}

	}

	printf("AC x %d\n", ac);

	printf("WA x %d\n", wa);

	printf("TLE x %d\n", tle);

	printf("RE x %d\n", re);

	return 0;

}
// Slower C++ solution:
#include<bits/stdc++.h>

using namespace std;



int main()

{

    long long n;

cin>>n;

    string str;

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

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

{

    cin>>str;

    transform(str.begin(), str.end(),str.begin(), ::toupper);



    if(str=="AC")

        a++;

    else if(str=="WA")

        b++;

    else if(str=="TLE")

    c++;

    else if(str=="RE")

        d++;

        else

            continue;

}

cout<<"AC x"<<" "<<a<<endl;

cout<<"WA x"<<" "<<b<<endl;

cout<<"TLE x"<<" "<<c<<endl;

cout<<"RE x"<<" "<<d<<endl;



}

// Faster C++ solution for the same problem (measured speedup: 5.250957215856886x):
#include<stdio.h>



int main(){

	int n, ac = 0, wa = 0, tle = 0, re = 0;

	char str[10];

	scanf("%d", &n);

	for(int i = 0; i < n; i++){

		scanf("%s", str);

		if(str[0] == 'A'){

			ac++;

		}

		if(str[0] == 'W'){

			wa++;

		}

		if(str[0] == 'T'){

			tle++;

		}

		if(str[0] == 'R'){

			re++;

		}

	}

	printf("AC x %d\n", ac);

	printf("WA x %d\n", wa);

	printf("TLE x %d\n", tle);

	printf("RE x %d\n", re);

	return 0;

}
// Slower C++ solution:
#include <iostream>



using namespace std;



int main()

{

    int n,ac=0,tle=0,wa=0,re=0;

    string s;

    cin>>n;

    while(n--){

        cin>>s;

        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;

}


// Faster C++ solution for the same problem (measured speedup: 5.252615617086605x):
#include<stdio.h>



int main(){

	int n, ac = 0, wa = 0, tle = 0, re = 0;

	char str[10];

	scanf("%d", &n);

	for(int i = 0; i < n; i++){

		scanf("%s", str);

		if(str[0] == 'A'){

			ac++;

		}

		if(str[0] == 'W'){

			wa++;

		}

		if(str[0] == 'T'){

			tle++;

		}

		if(str[0] == 'R'){

			re++;

		}

	}

	printf("AC x %d\n", ac);

	printf("WA x %d\n", wa);

	printf("TLE x %d\n", tle);

	printf("RE x %d\n", re);

	return 0;

}
// Slower C++ solution:
#include <iostream>

#include <string>

using namespace std;



int main()

{

    long long int n;

    int AC=0, WA=0, TLE=0, RE=0;



    cin>>n;



    string S[n];

    for(int i=0; i<n; i++){

        cin>>S[i];

    }



    for(int j=0; j<n; j++){

        if(S[j] == "AC"){AC++;}

        else if(S[j] == "WA"){WA++;}

        else if(S[j] == "TLE"){TLE++;}

        else if(S[j] == "RE"){RE++;}

    }

    cout<<"AC x "<<AC<<endl;

    cout<<"WA x "<<WA<<endl;

    cout<<"TLE x "<<TLE<<endl;

    cout<<"RE x "<<RE<<endl;



    return 0;

}


// Faster C++ solution for the same problem (measured speedup: 5.2515388398244305x):
#include<stdio.h>



int main(){

	int n, ac = 0, wa = 0, tle = 0, re = 0;

	char str[10];

	scanf("%d", &n);

	for(int i = 0; i < n; i++){

		scanf("%s", str);

		if(str[0] == 'A'){

			ac++;

		}

		if(str[0] == 'W'){

			wa++;

		}

		if(str[0] == 'T'){

			tle++;

		}

		if(str[0] == 'R'){

			re++;

		}

	}

	printf("AC x %d\n", ac);

	printf("WA x %d\n", wa);

	printf("TLE x %d\n", tle);

	printf("RE x %d\n", re);

	return 0;

}
// Slower C++ solution:
#include<bits/stdc++.h>

#define ll long long

using namespace std;

int main(){

	ll n;

	map<string,ll>m;

	cin >> n;

	for(int i=1; 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;

}

// Faster C++ solution for the same problem (measured speedup: 5.269058088002991x):
#include<stdio.h>



int main(){

	int n, ac = 0, wa = 0, tle = 0, re = 0;

	char str[10];

	scanf("%d", &n);

	for(int i = 0; i < n; i++){

		scanf("%s", str);

		if(str[0] == 'A'){

			ac++;

		}

		if(str[0] == 'W'){

			wa++;

		}

		if(str[0] == 'T'){

			tle++;

		}

		if(str[0] == 'R'){

			re++;

		}

	}

	printf("AC x %d\n", ac);

	printf("WA x %d\n", wa);

	printf("TLE x %d\n", tle);

	printf("RE x %d\n", re);

	return 0;

}
// Slower C++ solution:
#include <iostream>

#include<bits/stdc++.h>

using namespace std;





void countStr(char ser[], char* arr[],int n)

{

    int coun =0;



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

    {





        if(strcmp(arr[i],ser) ==0)

        {

            coun++;

        }



    }

    cout<<ser<<" "<<"x"<<" "<<coun<<endl;



}



int main()

{

    int n;

    cin>>n;

    char* arr[n];

    char x[3]="AC";





    if(n>0 && n<10^5)

    {

        cin.ignore();

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

        {

            arr[i]= new char[4];





            cin.getline(arr[i],4);



            arr[i][4]='\n';

            // cout<<arr[i]<<endl;

            if(strcmp(arr[i],x)!=0   &&  strcmp(arr[i],(char*)"WA")!=0    &&  strcmp(arr[i],(char*)"TLE")!=0   &&  strcmp(arr[i],(char*)"RE")!=0)

            {



                return 0;

            }





        }



        countStr("AC", arr,n);

        countStr("WA", arr,n);

        countStr("TLE",arr,n);

        countStr("RE", arr,n);





    }





    return 0;

}


// Faster C++ solution for the same problem (measured speedup: 5.244687367455917x):
#include<stdio.h>



int main(){

	int n, ac = 0, wa = 0, tle = 0, re = 0;

	char str[10];

	scanf("%d", &n);

	for(int i = 0; i < n; i++){

		scanf("%s", str);

		if(str[0] == 'A'){

			ac++;

		}

		if(str[0] == 'W'){

			wa++;

		}

		if(str[0] == 'T'){

			tle++;

		}

		if(str[0] == 'R'){

			re++;

		}

	}

	printf("AC x %d\n", ac);

	printf("WA x %d\n", wa);

	printf("TLE x %d\n", tle);

	printf("RE x %d\n", re);

	return 0;

}
// Slower C++ solution:
#include<bits/stdc++.h>

#define ll long long int

using namespace std;

int main()

{

    int n,i,a=0,w=0,t=0,r=0;

    cin>>n;

    string s[n];

    for(i=0; i<n; i++)

    {

        cin>>s[i];

    }

    for(i=0; i<n; i++)

    {

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

            a++;

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

            t++;

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

            w++;

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

            r++;

    }

    cout<<"AC x "<<a<<endl;

    cout<<"WA x "<<w<<endl;

    cout<<"TLE x "<<t<<endl;

    cout<<"RE x "<<r<<endl;

 

 

 

    return 0;

}

// Faster C++ solution for the same problem (measured speedup: 5.208043125195042x):
#include<stdio.h>



int main(){

	int n, ac = 0, wa = 0, tle = 0, re = 0;

	char str[10];

	scanf("%d", &n);

	for(int i = 0; i < n; i++){

		scanf("%s", str);

		if(str[0] == 'A'){

			ac++;

		}

		if(str[0] == 'W'){

			wa++;

		}

		if(str[0] == 'T'){

			tle++;

		}

		if(str[0] == 'R'){

			re++;

		}

	}

	printf("AC x %d\n", ac);

	printf("WA x %d\n", wa);

	printf("TLE x %d\n", tle);

	printf("RE x %d\n", re);

	return 0;

}
// Slower C++ solution:
#include <iostream>

#include <string>



using namespace std;



int main()

{

    int arr_size, AC_count = 0, WA_count = 0, TLE_count = 0, RE_count = 0;

    string array[100000], in;

    cin >> arr_size;

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

        cin >> array[i];

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

    {

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

            AC_count++;

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

            WA_count++;

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

            TLE_count++;

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

            RE_count++;

    }

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

}




// Faster C++ solution for the same problem (measured speedup: 4.361380406674069x):
#include <iostream>

#include<bits/stdc++.h>

using namespace std;



int main()

{

int AC=0,WA=0,TLE=0,RE=0;

int T;

cin>>T;

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

{

    string s;

    cin>>s;

 if(s=="AC")

        AC++;

 else if(s=="WA")

    WA++;

 else if(s=="TLE")

    TLE++;

 else if(s=="RE")

    RE++;



}

cout<<"AC x "<<AC<<endl<<"WA x "<<WA<<endl<<"TLE x "<<TLE<<endl<<"RE x "<<RE<<endl;

    return 0;

}
// Slower C++ solution:
#include <iostream>

#include <string>



using namespace std;



int main()

{

    int arr_size, AC_count = 0, WA_count = 0, TLE_count = 0, RE_count = 0;

    string array[100000], in;

    cin >> arr_size;

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

        cin >> array[i];

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

    {

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

            AC_count++;

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

            WA_count++;

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

            TLE_count++;

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

            RE_count++;

    }

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

}




// Faster C++ solution for the same problem (measured speedup: 4.399535294587652x):
#include <iostream>

#include <cstring>



using namespace std;



int main()

{

    int n, c0, c1, c2, c3, sVal;

    c0 = c1 = c2 = c3 = 0;

    cin >> n;

    char c [4];

    for (int i=0; i < n; i++) {

        cin >> c;

        sVal = strcmp(c, "RE");

        if ( sVal ==0) c3++;

        else if(sVal < 0) c0++;

        else {

            if (strcmp(c, "WA")==0) c1++;

            else c2++;

        }

    }

    cout << "AC x " << c0 << endl;

    cout << "WA x " << c1 << endl;

    cout << "TLE x " << c2 << endl;

    cout << "RE x " << c3 << endl;



    return 0;

}
// Slower C++ solution:
#include <iostream>

#include <string>



using namespace std;



int main()

{

    int arr_size, AC_count = 0, WA_count = 0, TLE_count = 0, RE_count = 0;

    string array[100000], in;

    cin >> arr_size;

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

        cin >> array[i];

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

    {

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

            AC_count++;

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

            WA_count++;

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

            TLE_count++;

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

            RE_count++;

    }

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

}




// Faster C++ solution for the same problem (measured speedup: 4.359650203725359x):
#include <iostream>

#include <cstring>

using namespace std;

int main()

{

    int N, t = 0, y = 0, z = 0, c = 0, i;

    cin >> N;

    string a[N];

    for (int i = 0; i < N; i++) {

        cin >> a[i];

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

            t = t + 1;

        if (a[i] == "WA")

            y = y + 1;

        if (a[i] == "TLE")

            z = z + 1;

        if (a[i] == "RE")

            c = c + 1;

    }

    cout << "AC x " << t << endl;

    cout << "WA x " << y << endl;

    cout << "TLE x " << z << endl;

    cout << "RE x " << c << endl;

    return 0;

}