1079: ABB字符串
Memory Limit:128 MB
Time Limit:1.000 S
Judge Style:Text Compare
Creator:
Submit:1
Solved:1
Description
给定一个字符串S,请统计S中有多少个ABB形式的子串, 以及多少种ABB形式的子串。
例如:S=“nnnseebbetoosee”,ABB形式的子串有see、 ebb、too、see,共4个;不同子串有see、ebb、too,共3种。
Input
输入一个长度不超过100的字符串S
Output
输出两个整数,分别表示S中有多少个ABB形式的子串,以及多少种ABB形式的子串,整数之间以一个空格隔开
Sample Input Copy
nnnseebbetoosee
Sample Output Copy
4 3