LightOJ 1033 Generating Palindromes(dp) 题目链接:http://acm.hust.edu.cn/vjudge/contest/view.action?cid=87730#problem/A 题目: Description By definition palindrome is a string which is not changed when reversed. "MADAM" is a nice example of palindrome.…
1033 - Generating Palindromes PDF (English) Statistics Forum Time Limit: 2 second(s) Memory Limit: 32 MB By definition palindrome is a string which is not changed when reversed. "MADAM" is a nice example of palindrome. It is an easy job to te…
You've got a string s = s1s2... s|s| of length |s|, consisting of lowercase English letters. There also are q queries, each query is described by two integers li, ri (1 ≤ li ≤ ri ≤ |s|). The answer to the query is the number of substrings of string s…