Submission #532929
Source Code Expand
#include <iostream> using namespace std; int main() { int T; cin >> T; for (int t = 0; t < T; ++t) { string s; cin >> s; int pos = 0, ans = 0; while (pos < s.size()) { if ( s.substr(pos, 5) == "tokyo" || s.substr(pos, 5) == "kyoto" ) { pos += 5; ++ans; } else { ++pos; } } cout << ans << endl; } }
Submission Info
Submission Time | |
---|---|
Task | A - 東京都 |
User | drafear |
Language | C++ (GCC 4.9.2) |
Score | 100 |
Code Size | 358 Byte |
Status | AC |
Exec Time | 28 ms |
Memory | 812 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 | 28 ms | 804 KB |
20_noised_tokyoto.txt | AC | 28 ms | 752 KB |
99_teuchi.txt | AC | 26 ms | 812 KB |