Submission #3327283
Source Code Expand
#include<bits/stdc++.h> using namespace std; int main(){ int t; cin >> t; string s[110]; for(int i = 0;i < t;i++){ cin >> s[i]; } vector<int> kekka(110); for(int i = 0;i < t;i++){ for(int j = 0;j < s[i].size();j++){ if(s[i].substr( j, 5) == "kyoto" || s[i].substr( j, 5) == "tokyo"){ kekka.at(i)++; for(int k = 0;k < 5;k++){ s[i].at(j + k) = '#'; } } } } for(int i = 0;i < t;i++){ cout << kekka.at(i) << endl; } }
Submission Info
Submission Time | |
---|---|
Task | A - 東京都 |
User | tyahan3278 |
Language | C++14 (GCC 5.4.1) |
Score | 100 |
Code Size | 520 Byte |
Status | AC |
Exec Time | 3 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 | 3 ms | 256 KB |
20_noised_tokyoto.txt | AC | 3 ms | 256 KB |
99_teuchi.txt | AC | 2 ms | 256 KB |