Submission #5565697


Source Code Expand

#include <iostream>
#include <vector>
#include <string>

using namespace std;

int main(){
    int T;
    cin >> T;

    vector<int> ans(T);
    
    for(int i = 0; i < T; i++){
        string test_value;
        cin >> test_value;
        int value_box = 0;
        for(int j = 0; j < test_value.length()-4; j++){
            string tmp(test_value,j,5);
            if(tmp == "tokyo" || tmp == "kyoto"){
                value_box++; 
                j += 4;
            }
        }
        ans[i] = value_box;
    }

    for(int i = 0; i < T; i++){
        cout << ans[i] << endl;
    }
    return 0;
}

Submission Info

Submission Time
Task A - 東京都
User yuyargon
Language C++14 (Clang 3.8.0)
Score 0
Code Size 635 Byte
Status RE
Exec Time 98 ms
Memory 512 KB

Judge Result

Set Name All
Score / Max Score 0 / 100
Status
AC × 2
RE × 1
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 384 KB
20_noised_tokyoto.txt AC 2 ms 256 KB
99_teuchi.txt RE 98 ms 512 KB