|
||||||||||
PalindromeTime Limit: 10000/6000 MS (Java/Others) Memory Limit: 125536/65536 K (Java/Others)Total Submission(s): 632 Accepted Submission(s): 3 Problem Description Given a string S,you are asked to find the longest palindrome in the substring [l,r]. Input The first line is a number T which indicates the number of test cases then follows a string s(length(s)<200000) s can consists all ascii characters Then an integer q,q querys(q<200000) each query is two integer l,r. find the longest palindrome in the substring [l,r]. Output the answer for each query. Sample Input
Sample Output
Hint 1 7 means aaabbcc the longest palindrome substring is aaa,whose length is 3. 4 5 means bb the longest palindrome substring is bb,whose length is 2. Source | ||||||||||
|