String occurences - MarisaOJ: Marisa Online Judge

String occurences

Time limit: 1000 ms
Memory limit: 256 MB
You are given 2 string S and T. Count the number of occurrences of T in S (i.e. how many substrings of S equal to T). ### Input - First line contains string S. - Second line contains string C. ### Output - The number of occurrences of T in S. ### Constraints - 1≤|T|≤|S|≤1000. ### Example Input: asasaasa Output: 2