Submission #2161196


Source Code Expand

#include<bits/stdc++.h>
const int INF = 1e9;
const int MOD = 1e9+7;
using LL = long long;
const LL LINF = 1e18;
using namespace std;
#define COUT(v) cout<<(v)<<endl
#define CIN(n)  int(n);cin >> (n)
#define SCIN(s) string(s);cin >> (s)
#define YES(n) cout<<((n)? "YES" : "NO")<<endl
#define Yes(n) cout<<((n)? "Yes" : "No")<<endl
#define POSSIBLE(n) cout << ((n) ? "POSSIBLE" : "IMPOSSIBLE"  ) << endl
#define Possible(n) cout << ((n) ? "Possible" : "Impossible"  ) <<endl

#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n) for(int i=0;i<(n);++i)
#define REPR(i,n) for(int i=n;i>=0;i--)

#define FOREACH(x,a) for(auto& (x) : (a) )

#define ALL(obj) (obj).begin(),(obj).end()

#define P pair<int,int>
#define I vector<int>
#define V vector
#define S set<int>
#define pb(v) push_back(v)
int main(){
    CIN(N);
    REP(a,N){
        SCIN(str);
        int s = 0;
        REP(b,str.size()-4){
            //COUT(str.substr(b,5));
            if(str.substr(b,5)=="tokyo"||str.substr(b,5)=="kyoto"){
                s++;
                b += 5;
            }
        }
        COUT(s);
    }
    return 0;
}

Submission Info

Submission Time
Task A - 東京都
User hamuhei4869
Language C++14 (GCC 5.4.1)
Score 0
Code Size 1157 Byte
Status RE
Exec Time 97 ms
Memory 256 KB

Judge Result

Set Name All
Score / Max Score 0 / 100
Status
WA × 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 WA 2 ms 256 KB
20_noised_tokyoto.txt WA 3 ms 256 KB
99_teuchi.txt RE 97 ms 256 KB