Submission #532992
Source Code Expand
#include <bits/stdc++.h> typedef long long LL; #define SORT(c) sort((c).begin(),(c).end()) #define FOR(i,a,b) for(int i=(a);i<(b);++i) #define REP(i,n) FOR(i,0,n) using namespace std; int main(void) { int t; cin >> t; while(t--){ string str; cin >> str; int i=0,answer=0; while(i<=str.size()-5){ string a(str.begin()+i,str.begin()+i+5); if(a=="kyoto"||a=="tokyo"){ answer++; i+=5; } else ++i; } cout << answer << endl; } return 0; }
Submission Info
Submission Time | |
---|---|
Task | A - 東京都 |
User | siotouto |
Language | C++11 (GCC 4.9.2) |
Score | 0 |
Code Size | 524 Byte |
Status | RE |
Exec Time | 308 ms |
Memory | 1008 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 | 34 ms | 976 KB |
20_noised_tokyoto.txt | AC | 33 ms | 1008 KB |
99_teuchi.txt | RE | 308 ms | 920 KB |