Submission #533058
Source Code Expand
#include <bits/stdc++.h> #define REP(i,n) for(int i=0; i<(n); i++) using namespace std; int main(){ int n;cin>>n; REP(i,n){ string s; cin>>s; int res=0; REP(k,s.size()-4){ if(s[k]=='t' &&s[k+1]=='o' &&s[k+2]=='k' &&s[k+3]=='y' &&s[k+4]=='o'){ res++; k+=4; } else if(s[k]=='k' &&s[k+1]=='y' &&s[k+2]=='o' &&s[k+3]=='t' &&s[k+4]=='o'){ res++; k+=4; } } cout << res << endl; } }
Submission Info
Submission Time | |
---|---|
Task | A - 東京都 |
User | wass80 |
Language | C++ (GCC 4.9.2) |
Score | 0 |
Code Size | 509 Byte |
Status | RE |
Exec Time | 616 ms |
Memory | 920 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 | 27 ms | 920 KB |
20_noised_tokyoto.txt | AC | 26 ms | 808 KB |
99_teuchi.txt | RE | 616 ms | 800 KB |