Submission #3806848
Source Code Expand
#include<bits/stdc++.h> using namespace std; int main(){ int n,i,j,ans=0; string a; cin>>n; while(n){ ans=0; n--; cin>>a; for(i=0;i<a.size();i++){ if(a[i]=='t'&&a[i+1]=='o'&&a[i+2]=='k'&&a[i+3]=='y'&&a[i+4]=='o'){ ans++; i+=4; } if(a[i]=='k'&&a[i+1]=='y'&&a[i+2]=='o'&&a[i+3]=='t'&&a[i+4]=='o'){ ans++; i+=4; } } cout<<ans<<endl; } }
Submission Info
Submission Time | |
---|---|
Task | A - 東京都 |
User | luogu_bot3 |
Language | C++ (GCC 5.4.1) |
Score | 100 |
Code Size | 400 Byte |
Status | AC |
Exec Time | 2 ms |
Memory | 256 KB |
Judge Result
Set Name | All | ||
---|---|---|---|
Score / Max Score | 100 / 100 | ||
Status |
|
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 |