Submission #533050
Source Code Expand
#include <iostream> #include <string> using namespace std; int main(){ int T; cin >> T; for(int k=0;k<T;k++){ string s; cin >> s; string to="tokyo"; string ky="kyoto"; int ans=0; for(int i=0;i<s.size()-4;i++){ int j=0; for(;j<5;j++){ if(to[j]!=s[i+j]) break; } if(j==5){ ans++; i+=4; } j=0; for(;j<5;j++){ if(ky[j]!=s[i+j]) break; } if(j==5){ ans++; i+=4; } } cout << ans <<endl; } return 0; }
Submission Info
Submission Time | |
---|---|
Task | A - 東京都 |
User | base64 |
Language | C++ (GCC 4.9.2) |
Score | 0 |
Code Size | 513 Byte |
Status | RE |
Exec Time | 284 ms |
Memory | 1124 KB |
Judge Result
Set Name | All | ||||
---|---|---|---|---|---|
Score / Max Score | 0 / 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 | 32 ms | 976 KB |
20_noised_tokyoto.txt | AC | 28 ms | 1124 KB |
99_teuchi.txt | RE | 284 ms | 1048 KB |