Submission #1405062
Source Code Expand
#include<iostream> #include<string> #include<algorithm> using namespace std; int main() { const string tokyo = "tokyo", kyoto = "kyoto"; int t; cin >> t; for (int i = 0; i < t; i++){ string s; cin >> s; int sum = 0; for (int j = 0; j < s.size() - 5; j++){ if (s.substr(j, 5) == tokyo) { sum++; i += 5; } else if (s.substr(j, 5) == kyoto) { sum++; i += 5; } } cout << sum << endl; } }
Submission Info
Submission Time | |
---|---|
Task | A - 東京都 |
User | th90tk297 |
Language | C++14 (GCC 5.4.1) |
Score | 0 |
Code Size | 419 Byte |
Status | RE |
Exec Time | 98 ms |
Memory | 384 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 | 1 ms | 256 KB |
20_noised_tokyoto.txt | WA | 1 ms | 256 KB |
99_teuchi.txt | RE | 98 ms | 384 KB |