Interesting Sequence

0

0 votes
Problem

Given a string p consisting of only 'A',' C', 'G' and 'T'.An Interesting Sequence is a substring of length 10, that occurs more than once in the given string. Print the number of Interesting sequences present in the given string.

Input:

string p composed of 'A', 'C', 'G' and 'T'

Output:

A single line containing integer n i.e your answer

Sample Input
AAAAACCCCCAAAAACCCCCCAAAAAGGGTTT
Sample Output
2
Time Limit: 2
Memory Limit: 256
Source Limit:
Explanation

Sample Test Case 1

Input: "AAAAACCCCCAAAAACCCCCCAAAAAGGGTTT"

output: 2

Explanation: ["AAAAACCCCC", "CCCCCAAAAA"]

these are the only two Interesting Sequence.

Editor Image

?