Submission #532948
Source Code Expand
#include <iostream> #include <string> using namespace std; int main(){ int T; string str; cin >> T; while(T--){ cin >> str; int cnt=0; for(int i=0;i<(int)str.size()-4;i++){ if(str[i]=='t'&&str[i+1]=='o'&&str[i+2]=='k'&&str[i+3]=='y'&&str[i+4]=='o'){ cnt++; i+=5; } else if(str[i]=='k'&&str[i+1]=='y'&&str[i+2]=='o'&&str[i+3]=='t'&&str[i+4]=='o'){ cnt++; i+=5; } } cout << cnt << endl; } return 0; }
Submission Info
Submission Time | |
---|---|
Task | A - 東京都 |
User | s1230146 |
Language | C++ (GCC 4.9.2) |
Score | 0 |
Code Size | 481 Byte |
Status | WA |
Exec Time | 33 ms |
Memory | 1040 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 | WA | 33 ms | 1036 KB |
20_noised_tokyoto.txt | WA | 32 ms | 1040 KB |
99_teuchi.txt | WA | 32 ms | 1040 KB |