|
|
SPOJ Problem Set (classical)
705. New Distinct Substrings
Problem code: SUBST1
|
Given a string, we need to find the total number of its distinct substrings.
Input
T- number of test cases. T<=20;
Each test case consists of one string, whose length is <= 50000
Output
For each test case output one number saying the number of distinct substrings.
Example
Input:
2
CCCCC
ABABA
Output:
5
9
| Added by: | Hoang Hong Quan |
| Date: | 2006-01-18 |
| Time limit: | 2s
|
| Source limit: | 50000B |
| Languages: | All except: CLOJ F# PERL 6 TECS |
| Resource: | Base on a problem in ByteCode06 |
|
|
|
|