Submission #2998707
Source Code Expand
#include <iostream> #include <vector> using ll = long long; using namespace std; int main() { int t; int c = 0, time = 0; vector<int> v; cin >> t; for (int i = 0; i < t; ++i) { string s; v.clear(); cin >> s; if(s.length()<5) break; for (unsigned int j = 0; j < s.length()-4; ++j) { if (s.substr(j, 5) == "kyoto") v.emplace_back(j); else if (s.substr(j, 5) == "tokyo") v.emplace_back(j); } c = 0, time = 0; for (auto &&a : v) { if(time <= a){ c++; time = a+5; } } cout << c << "\n"; } return 0; }
Submission Info
Submission Time | |
---|---|
Task | A - 東京都 |
User | firiexp |
Language | C++14 (GCC 5.4.1) |
Score | 0 |
Code Size | 719 Byte |
Status | WA |
Exec Time | 3 ms |
Memory | 256 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 | 3 ms | 256 KB |
20_noised_tokyoto.txt | AC | 3 ms | 256 KB |
99_teuchi.txt | WA | 1 ms | 256 KB |