Kick
Time limit3sMemory limit1024 MB
Count the occurrences of the substring kick in a lowercase string of up to 5 million characters, including overlapping matches.
- Level
Easy1 of 10
- Topics
- String, String matching
- Solved
- No attempts yet
Problem
You are given a string of lowercase English letters. A "kick" is a substring of that consists of the letter 'k', then 'i', then 'c', then 'k'. Count the number of distinct "kick" substrings in . Kicks may overlap.
Input
The input is a single line containing the string . The string consists of lowercase English letters, and its length is at most .
Output
Print the number of "kick" substrings on a line.