码迷,mamicode.com
首页 >  
搜索关键字:palindromes    ( 345个结果
[LeetCode]68. 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-11-09 13:58:52    阅读次数:256
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 th...
分类:其他好文   时间:2015-11-04 00:36:46    阅读次数:214
URAL 2040 Palindromes and Super Abilities 2
Palindromes and Super Abilities 2Time Limit: 500MS Memory Limit: 102400KB 64bit IO Format: %I64d & %I64uDescriptionDima adds letterss1, …,snone by o.....
分类:其他好文   时间:2015-10-27 14:54:25    阅读次数:211
Ural 1960 Palindromes and Super Abilities
Palindromes and Super AbilitiesTime Limit: 1000msMemory Limit: 65536KBThis problem will be judged onUral. Original ID:196064-bit integer IO format:%ll...
分类:其他好文   时间:2015-10-27 14:52:02    阅读次数:290
Light OJ 1033 - Generating Palindromes(区间DP)
题目大意:给你一个字符串,问最少增加几个字符使得这个字符串变为回文串。=======================================================================================#include#include#include#inc...
分类:其他好文   时间:2015-10-26 20:46:10    阅读次数:155
杭电acm2029-Palindromes _easy version
Problem Description“回文串”是一个正读和反读都一样的字符串,比如“level”或者“noon”等等就是回文串。请写一个程序判断读入的字符串是否是“回文”。Input输入包含多个测试实例,输入数据的第一行是一个正整数n,表示测试实例的个数,后面紧跟着是n个字符串。Output如果一...
分类:其他好文   时间:2015-10-21 23:57:00    阅读次数:265
关于10月15日#5的四道图论题的心得与感悟
还是我,接着补.....第一题:UVA 10943 送分题,几乎是动规入门的例题第二题:UVA 11584Partitioning by Palindromes .关于在字符串中寻找回文串,一开始的直观想法是先预处理再利用类似于线段覆盖的手法处理.但是两者之间存在差别.还是只有老老实实利用动规求解....
分类:其他好文   时间:2015-10-16 22:00:08    阅读次数:275
Partitioning by Palindromes
题意:给定一个字符串,求能分成最小几个回文串分析:简单dp dp[i]前i个字符能分成的最小数量 dp[i]=min(dp[i],dp[j-1]+1) (j-i 是回文串)#include #include #include #include #include #include #include #...
分类:其他好文   时间:2015-10-11 21:26:18    阅读次数:193
codeforces 245H H. Queries for Number of Palindromes(区间dp)
题目链接:codeforces 245H题目大意:给出一个字符串,询问任意区间内的回文子串的个数。题目分析: 定义isPar[i][j]表示区间字符串[i,j]是否是回文,可以通过isPar[i+1][j-1]递推得到。 定义dp[i][j]表示及区间[i,j]内的回文子串的个数,转移方程如下:dp[i][j]=dp[i+1][j]+dp[i][j?1]?dp[i+1][j?1]+isPar[i][...
分类:其他好文   时间:2015-10-05 10:28:02    阅读次数:152
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-09-09 06:20:00    阅读次数:207
345条   上一页 1 ... 15 16 17 18 19 ... 35 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!