Description
FlyBrother is a superman, therefore he is always busy saving the world.
To graduate from NUDT is boring but necessary for him. Typically We need to post an paper to get Graduate Certificate, however being one superman, FlyBrother wants to make his paper perfect. A paper is a lower case string. To make it perfect, FlyBrother wanna the number of different substrings in the paper. It is quite a silly problem for FlyBrother, but because he is so busy, can you help him to solve it?
?
Input
There are several cases. Process till EOF.
For each case, there is a line of lower case string (1<=length<=100000).
?
Output
For each case, output one number in a line of the answer described in the problem.
?
Sample Input
a
aab
Sample Output
1
5
HINT
题意: 求不同的字符串个数
思路: 在我的后缀数组题目小结里有一样的的题目,模板题
#include
#include
#include
#include
#include
#include