Submission #3808931


Source Code Expand

#include<bits/stdc++.h>
using namespace std;
int n,a[1000],k=1;
int main()
{
    cin>>n;
    for(int i=1;i<=n;i++)
    {
    	string s;
    	cin>>s;
    	for(int j=0;j<s.length();j++)
    	{
    		if(j<=s.length()-5&&s[j]=='t'&&s[j+1]=='o'&&s[j+2]=='k'&&s[j+3]=='y'&&s[j+4]=='o')
    		{
    			j+=4;
    			a[k]++;
			}
			if(j<=s.length()-5&&s[j]=='k'&&s[j+1]=='y'&&s[j+2]=='o'&&s[j+3]=='t'&&s[j+4]=='o')
    		{
    			j+=4;
    			a[k]++;
			}
		}
		k++;
	}
	for(int i=1;i<k;i++) cout<<a[i]<<endl;
	return 0;
}

Submission Info

Submission Time
Task A - 東京都
User luogu_bot4
Language C++ (GCC 5.4.1)
Score 100
Code Size 541 Byte
Status AC
Exec Time 2 ms
Memory 256 KB

Judge Result

Set Name All
Score / Max Score 100 / 100
Status
AC × 3
Set Name Test Cases
All 10_random_to_kyo.txt, 20_noised_tokyoto.txt, 99_teuchi.txt
Case Name Status Exec Time Memory
10_random_to_kyo.txt AC 2 ms 256 KB
20_noised_tokyoto.txt AC 2 ms 256 KB
99_teuchi.txt AC 2 ms 256 KB