Submission #532986


Source Code Expand

t = int(raw_input())
for _ in xrange(t):
    s = raw_input().strip()
    dp = [0] * 110
    for i in xrange(len(s)):
        dp[i+1] = max(dp[i+1], dp[i])
        if s[i:i+5] == 'kyoto':
            dp[i+5] = max(dp[i+5], dp[i] + 1)
        if s[i:i+5] == 'tokyo':
            dp[i+5] = max(dp[i+5], dp[i] + 1)
    print dp[len(s)]

Submission Info

Submission Time
Task A - 東京都
User nwin
Language Python (2.7.3)
Score 100
Code Size 343 Byte
Status AC
Exec Time 67 ms
Memory 3256 KB

Judge Result

Set Name All
Score / Max Score 100 / 100
Status
AC × 3
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 66 ms 3256 KB
20_noised_tokyoto.txt AC 67 ms 3244 KB
99_teuchi.txt AC 61 ms 3256 KB