CSU1656: Paper of FlyBrother(後綴數組)
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