Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <fstream>
- using namespace std;
- ifstream f("pufu.in");
- ofstream g("pufu.out");
- int t,n,c=0,ca=0,s=0;
- int main()
- {
- f >> t;
- while (t--)
- {
- f >> n;
- char x[10] = "";
- for (int i=1; i<=n ; i++)
- {
- f >> x;
- if (x[0] == 'c' && x[1] == 'i') c++;
- else if (x[0]=='c' && x[1] == 'a') ca++;
- else s++;
- char x[10]="";
- }
- }
- g << c << " " << ca << " " << s;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement