Time Limit: 1s
Memory Limit: 128MB
3 acacm moreandmorecold thisisthisththisisthisisthisththisis
7 19 82 For the first case, there are two "a","ac" and one "aca","acac","acacm" in the string "acacm". So the answer is 2 + 2 + 1 + 1 + 1 = 7