stablegradients/pie-gem5-bysrc huggingface dataset:
// Original C++ solution (slower):
#include <iostream>

#include <string>

#include <map>

#include <queue>

#include <vector>

#include<algorithm>

#include <set>

#include <stdlib.h>



using namespace std;



int main()

{

    map<string,int>m;

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

    int n;

    string arr;

    cin>>n;

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

    {

        cin>>arr;

        m[arr]++;

    }

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

        {cout<<a[i]<<" x "<<m[a[i]]<<endl;}

    return 0;

}


// Optimized solution to the same problem (faster):
#include <stdio.h>



int main() {

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

    scanf("%ld", &t);

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

        char temp[4];

        scanf("%s", &temp);

        switch (temp[0]) {

            case 'A':

                ac++;

                break;

            case 'W':

                wa++;

                break;

            case 'T':

                tle++;

                break;

            case 'R':

                re++;

                break;

        }

    }

    printf("AC x %d\nWA x %d\nTLE x %d\nRE x %d", ac, wa, tle, re);

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#include <iostream>



using namespace std;



int main()

{

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

    cin>>n;

    string s;

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

    {

        cin>>s;

        if(s=="AC")

            ac++;

        else if(s=="WA")

            wa++;

        else if(s=="TLE")

            tle++;

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

}


// Optimized solution to the same problem (faster):
#include <stdio.h>



int main() {

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

    scanf("%ld", &t);

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

        char temp[4];

        scanf("%s", &temp);

        switch (temp[0]) {

            case 'A':

                ac++;

                break;

            case 'W':

                wa++;

                break;

            case 'T':

                tle++;

                break;

            case 'R':

                re++;

                break;

        }

    }

    printf("AC x %d\nWA x %d\nTLE x %d\nRE x %d", ac, wa, tle, re);

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#include <iostream>



using namespace std;



int main()

{

    int n;

    cin>>n;

    string s[n];

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

    {

        cin>>s[i];

    }

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

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

}


// Optimized solution to the same problem (faster):
#include <stdio.h>



int main() {

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

    scanf("%ld", &t);

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

        char temp[4];

        scanf("%s", &temp);

        switch (temp[0]) {

            case 'A':

                ac++;

                break;

            case 'W':

                wa++;

                break;

            case 'T':

                tle++;

                break;

            case 'R':

                re++;

                break;

        }

    }

    printf("AC x %d\nWA x %d\nTLE x %d\nRE x %d", ac, wa, tle, re);

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#include <iostream>

#include <cstring>



using namespace std ;

int main ()

{

  int N ,x=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")

x=x+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 "<< x <<endl;

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

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

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

    return 0 ;

}






// Optimized solution to the same problem (faster):
#include <stdio.h>



int main() {

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

    scanf("%ld", &t);

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

        char temp[4];

        scanf("%s", &temp);

        switch (temp[0]) {

            case 'A':

                ac++;

                break;

            case 'W':

                wa++;

                break;

            case 'T':

                tle++;

                break;

            case 'R':

                re++;

                break;

        }

    }

    printf("AC x %d\nWA x %d\nTLE x %d\nRE x %d", ac, wa, tle, re);

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#include <iostream>

#include <cstring>



using namespace std;



int main()

{

    int N; cin >> N;

    int ctr = 0;

    int c0=0, c1=0, c2=0, c3=0;

    char input[6];

    do

    {

        cin >> input;

        ctr++;

        if (strcmp(input,"AC") == 0)

        {

            c0++;

        }

        else if (strcmp(input,"WA") == 0)

        {

            c1++;

        }

        else if (strcmp(input,"TLE") == 0)

        {

            c2++;

        }

        else if (strcmp(input,"RE") == 0)

        {

            c3++;

        }

    } while ( ctr < N);

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

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

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

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

    return 0;

}

// Optimized solution to the same problem (faster):
#include <stdio.h>



int main() {

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

    scanf("%ld", &t);

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

        char temp[4];

        scanf("%s", &temp);

        switch (temp[0]) {

            case 'A':

                ac++;

                break;

            case 'W':

                wa++;

                break;

            case 'T':

                tle++;

                break;

            case 'R':

                re++;

                break;

        }

    }

    printf("AC x %d\nWA x %d\nTLE x %d\nRE x %d", ac, wa, tle, re);

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#include <bits/stdc++.h>

#include <iostream>



 using namespace std;

main () 

{

  

int n;

cin >> n;

int c1=0,c2=0,c3=0,c4=0;

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

{

    string s;

    cin >>s;

    if (s=="AC")

    c1++;

    else if (s=="WA")

    c2++;

    else if (s=="RE")

    c3++;

    else if (s=="TLE")

    c4++;

}

  cout << "AC x " << c1 << "\n"<<"WA x " << c2 << "\n"<< "TLE x " << c4 << "\n"<<"RE x " << c3 << "\n";



return 0;

    

}

// Optimized solution to the same problem (faster):
#include <stdio.h>



int main() {

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

    scanf("%ld", &t);

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

        char temp[4];

        scanf("%s", &temp);

        switch (temp[0]) {

            case 'A':

                ac++;

                break;

            case 'W':

                wa++;

                break;

            case 'T':

                tle++;

                break;

            case 'R':

                re++;

                break;

        }

    }

    printf("AC x %d\nWA x %d\nTLE x %d\nRE x %d", ac, wa, tle, re);

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#include <iostream>

#include <bits/stdc++.h>

using namespace std;



// Common file

#include <ext/pb_ds/assoc_container.hpp>

// Including tree_order_statistics_node_update

#include <ext/pb_ds/tree_policy.hpp>

using namespace __gnu_pbds;

#define ordered_set tree<int, null_type,less<int>, rb_tree_tag,tree_order_statistics_node_update>







#define pb push_back

#define F first

#define S second

#define rep(i,n) for(int i = 0; i < (n); i++)



using ll = long long;

using ld = long double;

using ul = unsigned long long;

using ii = pair<int, int>;

#define Mosta     ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);

#define ReadFile            freopen("input.in","r",stdin)

#define WriteFile           freopen("output.txt","w",stdout)

const ll mod7 = 1000000007,mod = 1000000000,OO = 0x3f3f3f3f;

const ld EPS = 1e-7;

double Pi=acos(-1);

const ld rad=Pi/180.0;

ll power(ll x, ll y, ll p)

{

    ll res = 1;

    while (y > 0)

    {

        if (y & 1)

            res = (res*x) % p;

            y = y>>1;

            x = (x*x) % p;

    }

    return res;

}

ll nCr (ll n,ll m)

{

    return(m == 0)?1:n*nCr(n-1,m-1)/m;

}



/*****************************************************/



int main()

{

    int n;

    cin >> n;



    string s1 = "AC" , s2 = "WA" , s3 = "TLE" , s4 = "RE" , ss;

    int c0 = 0 , c1 = 0 , c2 = 0 , c3 = 0;



    while(n--) {

        cin >> ss;



        if(ss == s1)

            c0++;

        else if(ss == s2)

            c1++;

        else if(ss == s3)

            c2++;

        else

            c3++;

    }



    cout << s1 << " x " << c0 << "\n";

    cout << s2 << " x " << c1 << "\n";

    cout << s3 << " x " << c2 << "\n";

    cout << s4 << " x " << c3 << "\n";



    return 0;

}


// Optimized solution to the same problem (faster):
#include <stdio.h>



int main() {

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

    scanf("%ld", &t);

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

        char temp[4];

        scanf("%s", &temp);

        switch (temp[0]) {

            case 'A':

                ac++;

                break;

            case 'W':

                wa++;

                break;

            case 'T':

                tle++;

                break;

            case 'R':

                re++;

                break;

        }

    }

    printf("AC x %d\nWA x %d\nTLE x %d\nRE x %d", ac, wa, tle, re);

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#include <iostream>

#include <vector>

#include <algorithm>

using namespace std;



int main(){ int n, ac = 0, wa = 0, tle = 0, re = 0;

    cin >> n;

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

        cin >> code;

        if(code == "AC")

            ac++;

        else if(code == "WA")

            wa++;

        else if(code == "TLE")

            tle++;

        else if(code == "RE")

            re++;

    }

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

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

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

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

    return 0;

}

// Optimized solution to the same problem (faster):
#include <stdio.h>



int main() {

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

    scanf("%ld", &t);

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

        char temp[4];

        scanf("%s", &temp);

        switch (temp[0]) {

            case 'A':

                ac++;

                break;

            case 'W':

                wa++;

                break;

            case 'T':

                tle++;

                break;

            case 'R':

                re++;

                break;

        }

    }

    printf("AC x %d\nWA x %d\nTLE x %d\nRE x %d", ac, wa, tle, re);

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#include <bits/stdc++.h>

using namespace std;



int main() {

	map <string, int> m;

	long long n;

	string s;

	cin >> n;

	while(n--){

		cin >> s;

		m[s]++;

	}

	cout << "AC x " << m["AC"] << '\n';

	cout << "WA x " << m["WA"] << '\n';

	cout << "TLE x " << m["TLE"] << '\n';

	cout << "RE x " << m["RE"] << '\n';

}

// Optimized solution to the same problem (faster):
#include <stdio.h>



int main() {

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

    scanf("%ld", &t);

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

        char temp[4];

        scanf("%s", &temp);

        switch (temp[0]) {

            case 'A':

                ac++;

                break;

            case 'W':

                wa++;

                break;

            case 'T':

                tle++;

                break;

            case 'R':

                re++;

                break;

        }

    }

    printf("AC x %d\nWA x %d\nTLE x %d\nRE x %d", ac, wa, tle, re);

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#include <bits/stdc++.h>

#include<cmath>

using namespace std;



int main(){

int n;

string s1="AC",s2="WA",s3="TLE",s4="RE",m;

int c1=0,c2=0,c3=0,c4=0;

cin>>n;

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

    cin>>m;

    if(m==s1)c1++;

    else if(m==s2)c2++;

    else if(m==s3)c3++;

    else if(m==s4)c4++;



}

cout<<s1<<" x "<<c1<<endl<<s2<<" x "<<c2<<endl<<s3<<" x "<<c3<<endl<<s4<<" x "<<c4;



    return 0;

}




// Optimized solution to the same problem (faster):
#include <stdio.h>



int main() {

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

    scanf("%ld", &t);

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

        char temp[4];

        scanf("%s", &temp);

        switch (temp[0]) {

            case 'A':

                ac++;

                break;

            case 'W':

                wa++;

                break;

            case 'T':

                tle++;

                break;

            case 'R':

                re++;

                break;

        }

    }

    printf("AC x %d\nWA x %d\nTLE x %d\nRE x %d", ac, wa, tle, re);

}

// Fastest known solution for this problem:
// Original C++ solution (slower):


#include <iostream>

#include <algorithm>

#include <vector>

using namespace std;



int main() {

	int n, ac{ 0 }, wa{ 0 }, tle{ 0 }, re{ 0 };

	string s;



	cin >> n;

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

		cin >> s;

		if (s == "AC") {

			ac++;

		}

		else if (s == "WA") {

			wa++;

		}

		else if (s == "TLE") {

			tle++;

		}

		else {

			re++;

		}







	}



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

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

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

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

	return 0;

}

// Optimized solution to the same problem (faster):
#include <stdio.h>



int main() {

  int X, verdict[4] = {0}; // AC, WA, TLE, RE

  scanf("%d", &X);



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

    char str[5];

    scanf("%s", str);

    switch(str[0]) {

      case 'A':

        verdict[0]++;

        break;

      case 'W':

        verdict[1]++;

        break;

      case 'T':

        verdict[2]++;

        break;

      case 'R':

        verdict[3]++;

        break;

    }

  }



  printf("AC x %d\n", verdict[0]);

  printf("WA x %d\n", verdict[1]);

  printf("TLE x %d\n", verdict[2]);

  printf("RE x %d\n", verdict[3]);

  return 0;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#include<iostream>

#include<string>

using namespace std;

int main()

{

	int n,a,i,AC=0,TLE=0,RE=0,WA=0;

	cin>>n;

    string s;

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

    {

    	cin>>s;

     	if(s=="WA")

    	{

    		WA++;}

    		else if(s=="TLE")

    		{

    			TLE++;

    		}

    		else if(s=="RE")

    		{

    			RE++;

    		}

    		else if(s=="AC")

    		{

    			AC++;

    		}

    }

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

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

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

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

	

	return 0;

}

// Optimized solution to the same problem (faster):
#include <stdio.h>



int main() {

  int X, verdict[4] = {0}; // AC, WA, TLE, RE

  scanf("%d", &X);



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

    char str[5];

    scanf("%s", str);

    switch(str[0]) {

      case 'A':

        verdict[0]++;

        break;

      case 'W':

        verdict[1]++;

        break;

      case 'T':

        verdict[2]++;

        break;

      case 'R':

        verdict[3]++;

        break;

    }

  }



  printf("AC x %d\n", verdict[0]);

  printf("WA x %d\n", verdict[1]);

  printf("TLE x %d\n", verdict[2]);

  printf("RE x %d\n", verdict[3]);

  return 0;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#include<iostream>

#include<string>

#include<stdio.h>

#include<stdlib.h>

#include<set>

#include<map>

#include<vector>

#include<queue>

using namespace std;

#define mp(a,b) make_pair(a,b)

#define pb push_back



int main(){

    int n;

    cin>>n;

    int a[5];

    for (int i=1;i<=4;i++){

        a[i] = 0;

    }

    string sss;

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

        cin>>sss;

        if (sss == "AC"){

            a[1]++;

        }

        if (sss == "WA"){

            a[2]++;

        }

        if (sss == "TLE"){

            a[3]++;

        }

        if (sss == "RE"){

            a[4]++;

        }

    }

    cout<<"AC x "<<a[1]<<endl;

    cout<<"WA x "<<a[2]<<endl;

    cout<<"TLE x "<<a[3]<<endl;

    cout<<"RE x "<<a[4]<<endl;

}


// Optimized solution to the same problem (faster):
#include <stdio.h>



int main() {

	long int Zx = 0, Xy = 0, Yz = 0, xyz = 0, count;

	scanf("%ld", &count);

	for (int u = 0; u < count; u++) {

		char kata[5];

		scanf("%s", &kata);

		switch (kata[0]) {

			case 'A':

				Zx++;

				break;

			case 'W':

				Xy++;

				break;

			case 'T':

				Yz++;

				break;

			case 'R':

				xyz++;

				break;		

		}	

	}

	printf("AC x %d\nWA x %d\nTLE x %d\nRE x %d\n", Zx, Xy, Yz, xyz);

	return 0;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
// In the name of God



#include <bits/stdc++.h>



using namespace std;



int main() {

	ios_base::sync_with_stdio(false);

	cin.tie(0);



	map<string, int> mp;



	int n;

	cin >> n;

	while(n--) {

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



	return 0;

}


// Optimized solution to the same problem (faster):
#include <stdio.h>



int main() {

	long int Zx = 0, Xy = 0, Yz = 0, xyz = 0, count;

	scanf("%ld", &count);

	for (int u = 0; u < count; u++) {

		char kata[5];

		scanf("%s", &kata);

		switch (kata[0]) {

			case 'A':

				Zx++;

				break;

			case 'W':

				Xy++;

				break;

			case 'T':

				Yz++;

				break;

			case 'R':

				xyz++;

				break;		

		}	

	}

	printf("AC x %d\nWA x %d\nTLE x %d\nRE x %d\n", Zx, Xy, Yz, xyz);

	return 0;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#include <bits/stdc++.h>

#include <ext/pb_ds/assoc_container.hpp>

using namespace __gnu_pbds;

using namespace std;



typedef long long ll;

const int N = 2e5 + 10, OO = 0x3f3f3f3f, mod = 1e9 + 7;



#define PI acos(-1)

#define clr(arr, val) memset(arr, val, sizeof(arr))

#define loop(i, n) for (int i = 0; i < int(n); i++)

#define rloop(i, n) for (int i = int(n) - 1; i >= 0; i--)

#define xloop(i, a, b) for (int i = int(a); i <= int(b); i++)

#define ALL(v) ((v).begin()), ((v).end())

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

//int dx[] = {1, 0, -1, 0};

//int dy[] = {0, 1, 0, -1}; //4 Direction

int dx[] = {1, 1, 0, -1, -1, -1, 0, 1};

int dy[] = {0, 1, 1, 1, 0, -1, -1, -1}; //8 direction

//int dx[]={2,1,-1,-2,-2,-1,1,2};int dy[]={1,2,2,1,-1,-2,-2,-1};//Knight Direction

//int dx[6]={2,1,-1,-2,-1,1};int dy[6]={0,1,1,0,-1,-1}; //Hexagonal Direction



int n;

int main()

{

  //ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);



  cin >> n;

  string s;

  map < string , int > cnt;

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

    cin >> s;

    cnt[s]++;

  }



  cout << "AC x " << cnt["AC"] << "\n";

  cout << "WA x " << cnt["WA"] << "\n";

  cout << "TLE x " << cnt["TLE"] << "\n";

  cout << "RE x " << cnt["RE"] << "\n";





  return 0;

}


// Optimized solution to the same problem (faster):
#include <stdio.h>



int main() {

	long int Zx = 0, Xy = 0, Yz = 0, xyz = 0, count;

	scanf("%ld", &count);

	for (int u = 0; u < count; u++) {

		char kata[5];

		scanf("%s", &kata);

		switch (kata[0]) {

			case 'A':

				Zx++;

				break;

			case 'W':

				Xy++;

				break;

			case 'T':

				Yz++;

				break;

			case 'R':

				xyz++;

				break;		

		}	

	}

	printf("AC x %d\nWA x %d\nTLE x %d\nRE x %d\n", Zx, Xy, Yz, xyz);

	return 0;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#define _CRT_SECURE_NO_WARNINGS

#include <bits/stdc++.h>

#include <unordered_map>

#define endl '\n';

#define all(v) ((v).begin()), ((v).end())

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

#define Ceil(x,y)             ((x+y-1)/y)

#define RT(x)           return cout<<x,0;

#define mem(x,y)    memset(x,y,sizeof(x))

#define vi                    vector<int>

#define pii                 pair<int,int>

#define fx(n)           fixed<<setprecision(n)

#define watch(x) cout<<(#x)<<" = "<<x<<endl

#define forr(i, n) for (int i = 0; i < int(n); i++)

typedef long long ll;

typedef unsigned long long ull;

typedef double dl;

const double PI = acos(-1), EPS = 1e-7;

const int OO = 0x3f3f3f3f, N = 1e7 + 5, MOD = 1e9 + 7;

using namespace std;

void fast() { std::ios_base::sync_with_stdio(0); cin.tie(NULL); cout.tie(NULL); }

int main()

{

	fast();

	int n;

	cin>>n;

	map<string,int>mp;

	string s;

	while(n--)

    {

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

    return 0;

}


// Optimized solution to the same problem (faster):
#include <stdio.h>



int main() {

	long int Zx = 0, Xy = 0, Yz = 0, xyz = 0, count;

	scanf("%ld", &count);

	for (int u = 0; u < count; u++) {

		char kata[5];

		scanf("%s", &kata);

		switch (kata[0]) {

			case 'A':

				Zx++;

				break;

			case 'W':

				Xy++;

				break;

			case 'T':

				Yz++;

				break;

			case 'R':

				xyz++;

				break;		

		}	

	}

	printf("AC x %d\nWA x %d\nTLE x %d\nRE x %d\n", Zx, Xy, Yz, xyz);

	return 0;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#include <iostream>

using namespace std;

int main() {

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

    cin >> n;

    string s;

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

        cin>>s;

        if (s=="AC")

            AC++;

        else if (s=="WA")

            WA++;

        else if (s=="TLE")

            TLE++;

        else

            RE++;

    }

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

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

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

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

    return 0;

}

// Optimized solution to the same problem (faster):
#include <stdio.h>



int main() {

	long int Zx = 0, Xy = 0, Yz = 0, xyz = 0, count;

	scanf("%ld", &count);

	for (int u = 0; u < count; u++) {

		char kata[5];

		scanf("%s", &kata);

		switch (kata[0]) {

			case 'A':

				Zx++;

				break;

			case 'W':

				Xy++;

				break;

			case 'T':

				Yz++;

				break;

			case 'R':

				xyz++;

				break;		

		}	

	}

	printf("AC x %d\nWA x %d\nTLE x %d\nRE x %d\n", Zx, Xy, Yz, xyz);

	return 0;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#include <bits/stdc++.h>

using namespace std;



int main()

{

    int n,nAC=0,nWA=0,nTLE=0,nRE=0,i;

    string in;

    cin>>n;

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

    {

        cin>>in;

        if(in=="AC")

            nAC++;

        else if(in=="WA")

            nWA++;

        else if(in=="TLE")

            nTLE++;

        else

            nRE++;

    }

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

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

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

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

    return 0;

}

// Optimized solution to the same problem (faster):
#include <stdio.h>



int main() {

	long int Zx = 0, Xy = 0, Yz = 0, xyz = 0, count;

	scanf("%ld", &count);

	for (int u = 0; u < count; u++) {

		char kata[5];

		scanf("%s", &kata);

		switch (kata[0]) {

			case 'A':

				Zx++;

				break;

			case 'W':

				Xy++;

				break;

			case 'T':

				Yz++;

				break;

			case 'R':

				xyz++;

				break;		

		}	

	}

	printf("AC x %d\nWA x %d\nTLE x %d\nRE x %d\n", Zx, Xy, Yz, xyz);

	return 0;

}

// Fastest known solution for this problem: