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
问题描述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
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
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
题目大意:给你一个字符串,问最少增加几个字符使得这个字符串变为回文串。=======================================================================================#include#include#include#inc...
分类:
其他好文 时间:
2015-10-26 20:46:10
阅读次数:
155
Problem Description“回文串”是一个正读和反读都一样的字符串,比如“level”或者“noon”等等就是回文串。请写一个程序判断读入的字符串是否是“回文”。Input输入包含多个测试实例,输入数据的第一行是一个正整数n,表示测试实例的个数,后面紧跟着是n个字符串。Output如果一...
分类:
其他好文 时间:
2015-10-21 23:57:00
阅读次数:
265
还是我,接着补.....第一题:UVA 10943 送分题,几乎是动规入门的例题第二题:UVA 11584Partitioning by Palindromes .关于在字符串中寻找回文串,一开始的直观想法是先预处理再利用类似于线段覆盖的手法处理.但是两者之间存在差别.还是只有老老实实利用动规求解....
分类:
其他好文 时间:
2015-10-16 22:00:08
阅读次数:
275
题意:给定一个字符串,求能分成最小几个回文串分析:简单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题目大意:给出一个字符串,询问任意区间内的回文子串的个数。题目分析:
定义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
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