思路肯定是没有问题,但是不知道为啥一直 TLE 两个点~ #include <bits/stdc++.h> #define N 2000006 #define setIO(s) freopen(s".in","r",stdin) using namespace std; multiset<int>id,len; multiset<int>::iterator it; int arr[N],st[N],length[N],idxx[…
A string s is called an (k,l)-repeat if s is obtained by concatenating k>=1 times some seed string t with length l>=1. For example, the string s = abaabaabaaba is a (4,3)-repeat with t = aba as its seed string. That is, the seed string t is 3 charac…
The Number of Palindromes Problem Description Now, you are given a string S. We want to know how many distinct substring of S which is palindrome. Input The first line of the input contains a single integer T(T<=20), which indicates number of test ca…