题目链接:http://codeforces.com/problemset/problem/245/H题目大意:给你一个字符串s,对于每次查询,输入为一个数对(i,j),输出s[i..j]之间回文串的个数。容斥原理: dp[i][j] = dp[i+1][j]+dp[i][j-1]-dp[i+1][...
分类:
其他好文 时间:
2015-05-25 07:25:36
阅读次数:
125
We say a sequence of characters is a
palindrome if it is the same written
forwards and backwards. For exam-
ple, ‘
racecar
’ is a palindrome, but
‘
fastcar
’ is not.
A
partition
of a sequenc...
分类:
其他好文 时间:
2015-05-21 22:45:42
阅读次数:
229
Palindrome Number Some hints:Could negative integers be palindromes? (ie, -1)If you are thinking of converting the integer to string, note the restriction of using extra space.You could also try revers...
分类:
其他好文 时间:
2015-05-19 10:43:23
阅读次数:
122
??
回文词
Time Limit:3000MS Memory Limit:0KB 64bit IO Format:%lld
& %llu
Submit Status Practice UVA
401
Appoint description:
acmparand (2013-07-07)Luke (2014-01-20)
Syst...
分类:
其他好文 时间:
2015-05-15 21:26:05
阅读次数:
257
题目传送门 1 /* 2 题意:给出一个长为n的仅由小写英文字母组成的字符串,求它的回文串划分的元素的最小个数,并按顺序输出此划分方案 3 回文串+回溯:dp[i] 表示前i+1个字符(从0开始)最少需要划分的数量,最大值是i+1,即单个回文串; 4 之前设置ok[j...
分类:
其他好文 时间:
2015-05-10 18:53:07
阅读次数:
108
Determine whether an integer is a palindrome. Do this without extra space.click to show spoilers.Some hints:Could negative integers be palindromes? (i...
分类:
其他好文 时间:
2015-05-09 07:42:26
阅读次数:
124
题目描述Determine whether an integer is a palindrome. Do this without extra space.Some hints:
Could negative integers be palindromes? (ie, -1)
—— 负数不为回文If you are thinking of converting the integer to s...
分类:
其他好文 时间:
2015-05-07 14:30:59
阅读次数:
119
Problem:
Determine whether an integer is a palindrome. Do this without extra space.
click to show spoilers.
Some hints:
Could negative integers be palindromes? (ie, -1)
If you are thinkin...
分类:
其他好文 时间:
2015-05-07 12:28:14
阅读次数:
143
uva 11151 Longest PalindromeA palindrome is a string that reads the same from the left as it does from the right. For example, I, GAG and MADAM are palindromes, but ADAM is not. Here, we consider also...
分类:
其他好文 时间:
2015-05-06 17:56:58
阅读次数:
116
【题目】 Determine whether an integer is a palindrome. Do this without extra space.
click to show spoilers.
Some hints:
Could negative integers be palindromes? (ie, -1)
If you are thinking of co...
分类:
其他好文 时间:
2015-05-06 13:26:23
阅读次数:
115