码迷,mamicode.com
首页 >  
搜索关键字:palindromes    ( 345个结果
[CF245H] Queries for Number of Palindromes (容斥原理dp计数)
题目链接: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
UVA11584---Partitioning by Palindromes(dp)
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
Leetcode第九题_Palindrome Number
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
UVA 401 Palindromes(回文词)
??  回文词 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
回文串+回溯法 URAL 1635 Mnemonics and Palindromes
题目传送门 1 /* 2 题意:给出一个长为n的仅由小写英文字母组成的字符串,求它的回文串划分的元素的最小个数,并按顺序输出此划分方案 3 回文串+回溯:dp[i] 表示前i+1个字符(从0开始)最少需要划分的数量,最大值是i+1,即单个回文串; 4 之前设置ok[j...
分类:其他好文   时间:2015-05-10 18:53:07    阅读次数:108
【leetcode】Palindrome Number
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
LeetCode (30) Palindrome Number (回文数字)
题目描述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
LeetCode 9 Palindrome Number
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 Palindrome (最长公共子序列)
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
Palindrome Number ——解题笔记
【题目】 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
345条   上一页 1 ... 22 23 24 25 26 ... 35 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!