stablegradients/pie-gem5-pairs huggingface dataset:
// Slower C++ solution:
#include <cstdlib>

#include <cstdio>

#include <cstring>

#include <cmath>

#include <iostream>

#include <algorithm>

#include <stack>

using namespace std;



int main(void)

{

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

  int N;

  scanf("%d",&N);

  char s[100];

  int numA=0,numW=0,numT=0,numR=0;

  for (int i=1;i<=N;i++)

  {

    scanf("%s",s);

    if (s[0]=='A') numA++;

    if (s[0]=='W') numW++;

    if (s[0]=='T') numT++;

    if (s[0]=='R') numR++;

  }

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

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

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

  printf("RE x %d",numR);





  return 0;

}

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



int main() {



    int t, cntAC=0, cntWA=0, cntTLE=0, cntRE=0;

    char str[105];



    scanf("%d", &t);

    while(t--) {

        scanf("%s", str);

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

            cntAC++;

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

            cntWA++;

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

            cntTLE++;

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

            cntRE++;

        }

    }



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

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

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

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



    return 0;

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

#define ll long long

#define endl "\n"

#define pb push_back

#define READ(FILE) freopen(FILE,"r",stdin)

#define WRITE(FILE) freopen(FILE,"w",stdout)

#define loop(i,s,e) for(int i=s;i<e;i++)

#define mego fast();

using namespace std;

void fast()

{

    ios::sync_with_stdio(0);

    cin.tie(0);

    cout.tie(0);

}



ll lcm(ll x, ll y)

{

    return (x*y)/__gcd(x,y);

}

int sum(string s)

{

    int x=0,sz=s.size();

    loop(i,0,sz)x+=(s[i]-'0');

    return x;

}

/*

struct node

{

int data;

node *link;

};

typedef node* nodeptr;

void head_insert(nodeptr& head,int x)

{

    nodeptr tmp;

    tmp=new node;

    tmp->data=x;

    tmp->link=head;

    head=tmp;

}

nodeptr search(nodeptr head,int x)

{

    nodeptr cur=head;

    if(cur ==  nullptr)return cur;

    while(cur->data!=x&&cur->link!=nullptr)

    {

        cur=cur->link;

    }

    if(cur->data==x)return cur;

    else return nullptr;

}

void show(nodeptr head)

{

    nodeptr cur=head;

    if(cur==nullptr)return;

   // cout<<head->data<<" ";

    while(cur->link!=nullptr){

        cout<<cur->data<<" ";

        cur=cur->link;

    }

    cout<<endl;

}

*/



int main()

{

    mego

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

    string s;

    cin>>n;

    loop(i,0,n)

    {

        cin>>s;

        if(s=="AC")

            a++;

        else if(s=="WA")

            b++;

        else if(s=="TLE")

            c++;

        else

            d++;



    }

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

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

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

    cout<<"RE x "<<d;

    return 0;

}


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



int main() {



    int t, cntAC=0, cntWA=0, cntTLE=0, cntRE=0;

    char str[105];



    scanf("%d", &t);

    while(t--) {

        scanf("%s", str);

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

            cntAC++;

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

            cntWA++;

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

            cntTLE++;

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

            cntRE++;

        }

    }



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

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

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

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



    return 0;

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

using namespace std;



int main()

{

    ios::sync_with_stdio(0);

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

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

    string s;

    while (n--)

    {

        cin >> s;

        if(s == "AC") ac++;

        else if(s == "WA") wa++;

        else if(s == "TLE") tle++;

        else re++;

    }

    cout << "AC x " << ac << "\nWA x " << wa << "\nTLE x " << tle << "\nRE x " << re << '\n';

    return 0;

}

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



int main() {



    int t, cntAC=0, cntWA=0, cntTLE=0, cntRE=0;

    char str[105];



    scanf("%d", &t);

    while(t--) {

        scanf("%s", str);

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

            cntAC++;

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

            cntWA++;

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

            cntTLE++;

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

            cntRE++;

        }

    }



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

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

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

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



    return 0;

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



using namespace std;





int main()

{

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

string stats;

cin>>n;

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

    cin>>stats;

    if(stats=="AC"){ac++;}

    else if(stats=="WA"){wa++;}

    else if(stats=="RE"){re++;}

    else if(stats=="TLE"){tle++;}



}

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.253468870277442x):
#include <stdio.h>



int main() {



    int t, cntAC=0, cntWA=0, cntTLE=0, cntRE=0;

    char str[105];



    scanf("%d", &t);

    while(t--) {

        scanf("%s", str);

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

            cntAC++;

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

            cntWA++;

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

            cntTLE++;

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

            cntRE++;

        }

    }



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

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

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

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



    return 0;

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

#include <vector>

#include <queue>

#include <algorithm>

#include <cmath>

#include <map>

#include <stdio.h>

#define IO ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);

#define ll long long

#define pie 3.141592653



using namespace std;





int main()

{

	IO;



	int n;

	string s;

	vector <pair<string, int>>vp;

	vp.push_back(make_pair("AC", 0));

	vp.push_back(make_pair("WA", 0));

	vp.push_back(make_pair("TLE", 0)); 

	vp.push_back(make_pair("RE", 0));

	cin >> n;



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

	{

		cin >> s;

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

		{

			if (vp[j].first == s)

			{

				vp[j].second++;

				break;

			}

		}

	}

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

	{

		cout << vp[i].first << " x " << vp[i].second;

		if (i < 3)

			cout << "\n";

	}

	return 0;

}


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



int main() {



    int t, cntAC=0, cntWA=0, cntTLE=0, cntRE=0;

    char str[105];



    scanf("%d", &t);

    while(t--) {

        scanf("%s", str);

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

            cntAC++;

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

            cntWA++;

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

            cntTLE++;

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

            cntRE++;

        }

    }



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

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

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

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



    return 0;

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

#include<map>



using namespace std;



int main()

{

    int n;

    cin>>n;

    map<string,int>mymap;

    char str[100];

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

        cin>>str,mymap[str]++;

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

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

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

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



    return 0;

}

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



int main() {



    int t, cntAC=0, cntWA=0, cntTLE=0, cntRE=0;

    char str[105];



    scanf("%d", &t);

    while(t--) {

        scanf("%s", str);

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

            cntAC++;

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

            cntWA++;

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

            cntTLE++;

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

            cntRE++;

        }

    }



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

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

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

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



    return 0;

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

using namespace std;

int main(){

    int tc;cin>>tc;

    int acCount,waCount,tleCount,reCount;

    acCount = waCount = tleCount = reCount = 0;

    while(tc > 0){

        char arr[4];

        cin>>arr;

        if(arr[0] == 'A' && arr[1] == 'C')

            acCount++;

        else if(arr[0] == 'W' && arr[1] == 'A')

            waCount++;

        else if(arr[0] == 'R' && arr[1] == 'E')

            reCount++;

        else

            tleCount++;

        tc--;

    }

    cout<<"AC x "<<acCount<<"\n";

    cout<<"WA x "<<waCount<<"\n";

    cout<<"TLE x "<<tleCount<<"\n";

    cout<<"RE x "<<reCount<<"\n";

    return 0;

}


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



int main() {



    int t, cntAC=0, cntWA=0, cntTLE=0, cntRE=0;

    char str[105];



    scanf("%d", &t);

    while(t--) {

        scanf("%s", str);

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

            cntAC++;

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

            cntWA++;

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

            cntTLE++;

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

            cntRE++;

        }

    }



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

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

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

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



    return 0;

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



using namespace std;



int main()

{

    int n;

    cin>>n;

    string s;

    int arr[4]={0};

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

        cin>>s;

        if (s=="AC")

            arr[0]++;

        else if (s=="WA")

            arr[1]++;

        else if (s=="TLE")

            arr[2]++;

        else

            arr[3]++;

    }

    cout<<"AC x "<<arr[0]<<"\n";

    cout<<"WA x "<<arr[1]<<"\n";

    cout<<"TLE x "<<arr[2]<<"\n";

    cout<<"RE x "<<arr[3];



    return 0;

}


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



int main() {



    int t, cntAC=0, cntWA=0, cntTLE=0, cntRE=0;

    char str[105];



    scanf("%d", &t);

    while(t--) {

        scanf("%s", str);

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

            cntAC++;

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

            cntWA++;

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

            cntTLE++;

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

            cntRE++;

        }

    }



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

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

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

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



    return 0;

}
// Slower C++ solution:
#define ll long long int



#include <bits/stdc++.h>



using namespace std;



int main() {



 int n ;

 cin >> n ;

 map<string ,int>mp;

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

 {

     string s ;

     cin >> s ;

     mp[s]++;

 }



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

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

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

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





    return 0;

}


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



int main() {



    int t, cntAC=0, cntWA=0, cntTLE=0, cntRE=0;

    char str[105];



    scanf("%d", &t);

    while(t--) {

        scanf("%s", str);

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

            cntAC++;

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

            cntWA++;

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

            cntTLE++;

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

            cntRE++;

        }

    }



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

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

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

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



    return 0;

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

#include <string>

using namespace std;



int main ()

{

    int N{};

    cin >> N;

    

    string Si[N];

    for (int i{}; i<N; i++) 

        {

            cin >> Si[i];

        }

    int C[4] {0,0,0,0};

    for (auto i : Si) 

        {

            if (i == "AC")

                C[0] += 1;

            if (i == "WA")

                C[1] += 1;

            if (i == "TLE")

                C[2] += 1;

            if (i == "RE")

                C[3] += 1;

        }

    cout << "AC x " << C[0] << endl;

    cout << "WA x " << C[1] << endl;

    cout << "TLE x " << C[2] << endl;

    cout << "RE x " << C[3] << endl;

        

	return 0;

}


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



int main() {



    int t, cntAC=0, cntWA=0, cntTLE=0, cntRE=0;

    char str[105];



    scanf("%d", &t);

    while(t--) {

        scanf("%s", str);

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

            cntAC++;

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

            cntWA++;

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

            cntTLE++;

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

            cntRE++;

        }

    }



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

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

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

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



    return 0;

}
// Slower C++ solution:


#include <iostream>

#include <string>

#include <vector>

#include <algorithm>

#import<iostream>

#include <bits/stdc++.h>

using namespace std;



int main()

{

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

    int C0=0,C1=0,C2=0,C3=0;

    int N;

    cin>>N;

    string arr_2[N];

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

    {

        cin>>arr_2[i];



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

            C0+=1;

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

            C1+=1;

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

            C2+=1;

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

            C3+=1;

    }



    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.2500103880090485x):
#include <stdio.h>



int main() {



    int t, cntAC=0, cntWA=0, cntTLE=0, cntRE=0;

    char str[105];



    scanf("%d", &t);

    while(t--) {

        scanf("%s", str);

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

            cntAC++;

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

            cntWA++;

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

            cntTLE++;

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

            cntRE++;

        }

    }



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

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

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

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



    return 0;

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

#include <algorithm>

using namespace std;



int main()

{

   int n,c=0,w=0,t=0,r=0;

   cin>>n;

   string a[n];

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

    cin>>a[i];

   }

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

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

        c++;

    }

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

        w++;

    }

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

        t++;

    }

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

        r++;

    }

   }

   cout<<"AC x "<<c<<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.20974259963067x):
#include <stdio.h>



int main() {



    int t, cntAC=0, cntWA=0, cntTLE=0, cntRE=0;

    char str[105];



    scanf("%d", &t);

    while(t--) {

        scanf("%s", str);

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

            cntAC++;

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

            cntWA++;

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

            cntTLE++;

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

            cntRE++;

        }

    }



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

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

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

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



    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: 22.906174535945894x):
#include <stdio.h>



int main() {



    int t, cntAC=0, cntWA=0, cntTLE=0, cntRE=0;

    char str[105];



    scanf("%d", &t);

    while(t--) {

        scanf("%s", str);

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

            cntAC++;

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

            cntWA++;

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

            cntTLE++;

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

            cntRE++;

        }

    }



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

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

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

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



    return 0;

}
// Slower C++ solution:
#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;

}


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



int main() {



    int t, cntAC=0, cntWA=0, cntTLE=0, cntRE=0;

    char str[105];



    scanf("%d", &t);

    while(t--) {

        scanf("%s", str);

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

            cntAC++;

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

            cntWA++;

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

            cntTLE++;

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

            cntRE++;

        }

    }



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

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

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

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



    return 0;

}
// Slower C++ solution:
#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;

}


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



int main() {



    int t, cntAC=0, cntWA=0, cntTLE=0, cntRE=0;

    char str[105];



    scanf("%d", &t);

    while(t--) {

        scanf("%s", str);

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

            cntAC++;

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

            cntWA++;

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

            cntTLE++;

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

            cntRE++;

        }

    }



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

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

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

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



    return 0;

}
// Slower C++ solution:
#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;

}

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



int main() {



    int t, cntAC=0, cntWA=0, cntTLE=0, cntRE=0;

    char str[105];



    scanf("%d", &t);

    while(t--) {

        scanf("%s", str);

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

            cntAC++;

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

            cntWA++;

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

            cntTLE++;

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

            cntRE++;

        }

    }



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

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

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

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



    return 0;

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

using namespace std;



int main() {

   int N;

   cin >> N;

   map<string, int> ans;

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

       string s;

       cin >> s;

       ans[s]++;

   }

   for (string s: {"AC", "WA", "TLE", "RE"}) {

       cout << s << " x " << ans[s] << endl;

   }

}

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



int main() {



    int t, cntAC=0, cntWA=0, cntTLE=0, cntRE=0;

    char str[105];



    scanf("%d", &t);

    while(t--) {

        scanf("%s", str);

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

            cntAC++;

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

            cntWA++;

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

            cntTLE++;

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

            cntRE++;

        }

    }



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

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

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

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



    return 0;

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

using namespace std;

int main() {

    int n;

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

    cin >>n;

    string arr[n];

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

        cin>>arr[i];

        if(arr[i]=="AC"){a++;}

        else if (arr[i]=="WA"){w++;}

        else if (arr[i]=="TLE"){t++;}

        else if (arr[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.253468870277442x):
#include <stdio.h>



int main() {



    int t, cntAC=0, cntWA=0, cntTLE=0, cntRE=0;

    char str[105];



    scanf("%d", &t);

    while(t--) {

        scanf("%s", str);

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

            cntAC++;

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

            cntWA++;

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

            cntTLE++;

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

            cntRE++;

        }

    }



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

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

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

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



    return 0;

}
// Slower C++ solution:


#include <iostream>

#include <string>

using namespace std;



int  main() {

	int x, q = 0, w = 0, e = 0, r = 0;

	string a = "AC", b = "WA", c = "RE", t = "TLE",m;

	cin >> x;

	for (size_t i = 0; i < x; i++)

	{

		cin >> m;

		if (m==a)

		{

			q++;

		}

		else if (m == b) {

			w++;

		}

		else if (m == t) {

			e++;

		}

		else if (m == c) {

			r++;

	}

	}

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

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

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

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

}


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



int main() {



    int t, cntAC=0, cntWA=0, cntTLE=0, cntRE=0;

    char str[105];



    scanf("%d", &t);

    while(t--) {

        scanf("%s", str);

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

            cntAC++;

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

            cntWA++;

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

            cntTLE++;

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

            cntRE++;

        }

    }



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

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

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

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



    return 0;

}