2970: 子串计算
Memory Limit:32 MB
Time Limit:1.000 S
Judge Style:Text Compare
Creator:
Submit:2
Solved:2
Description
给出一个01字符串(长度不超过100),求其每一个子串出现的次数。
Input
输入包含多行,每行一个字符串。
Output
对每个字符串,输出它所有出现次数在1次以上的子串和这个子串出现的次数,输出按字典序排序。
Sample Input Copy
1010100001
1010
Sample Output Copy
0 6
00 3
000 2
01 3
010 2
1 4
10 3
101 2
1010 2
0 2
1 2
10 2
HINT
字符串前缀查找