Submission #3228569
Source Code Expand
#include <bits/stdc++.h> using namespace std; int main(void) { int t; cin >> t; vector<string> s(t); for (int i = 0; i < t; i++) cin >> s[i]; string tokyo = "tokyo"; string kyoto = "kyoto"; for (int i = 0; i < t; i++) { int count = 0; for (int j = 0; j < s[i].size(); j++) { if (equal(tokyo.begin(), tokyo.end(), s[i].begin()+j)) { j += 4; count++; } else if (equal(kyoto.begin(), kyoto.end(), s[i].begin()+j)) { j += 4; count++; } } cout << count << endl; } return 0; }
Submission Info
Submission Time | |
---|---|
Task | A - 東京都 |
User | lizardxcc |
Language | C++14 (GCC 5.4.1) |
Score | 100 |
Code Size | 547 Byte |
Status | AC |
Exec Time | 2 ms |
Memory | 256 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 | 2 ms | 256 KB |
20_noised_tokyoto.txt | AC | 2 ms | 256 KB |
99_teuchi.txt | AC | 1 ms | 256 KB |