求不同子串个数 裸的后缀自动机 #include<cstring> #include<cmath> #include<iostream> #include<algorithm> #include<cstdio> #define ll long long #define N 2000007 using namespace std; inline int read() { ,f=;char ch=getchar(); ;ch=getchar();}…
1811. Longest Common Substring Problem code: LCS A string is finite sequence of characters over a non-empty finite set Σ. In this problem, Σ is the set of lowercase letters. Substring, also called factor, is a consecutive sequence of characters occur…
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 <= 1000 Output For each test case output one number saying the number of distinc…