码迷,mamicode.com
首页 >  
搜索关键字:palindrome    ( 1561个结果
poj1159(dp)
题目链接:http://poj.org/problem?id=1159   Palindrome Time Limit: 3000MS   Memory Limit: 65536K Total Submissions: 56628   Accepted: 19577 Description A palindrome is a symmet...
分类:其他好文   时间:2015-08-19 20:26:16    阅读次数:135
[leetcode] Palindrome Number
题目:Determine whether an integer is a palindrome. Do this without extra space.解题思路:循环取得首位和末尾,然后比较。解题心得:关于整数的处理有几个 运算需要熟记:一个整数:%10 得个位 , %100 的后两位 就是个位和...
分类:其他好文   时间:2015-08-19 10:58:14    阅读次数:122
hihoCoder #1149 Palindrome
DescriptionGiven a string, calculate the number of subsequences that are palindrome. A palindrome is a sequence of characters that reads the same back...
分类:其他好文   时间:2015-08-19 00:16:52    阅读次数:166
区间DP UVA 10739 String to Palindrome
题目传送门 1 /* 2 题意:三种操作,插入,删除,替换,问最少操作数使得字符串变成回文串 3 区间DP:有一道类似的题,有点不同的是可以替换,那么两端点不同的时候可以替换掉一个后成回文, 4 即dp[j+1][k-1] + 1,还有这道题没有要求打印 5 ...
分类:其他好文   时间:2015-08-17 17:15:16    阅读次数:162
【POJ 1159】Palindrome
【POJ 1159】Palindrome最近各种题各种奇葩思路已经司空见惯了。。。又新出个滚动数组= = 该题还有一点需要知道 最少需要补充的字母数 = 原序列S的长度 — S和S’的最长公共子串长度 然而窝原本并不知道……然后写出了一个奇葩dp做法 居然比LCS快0.0我的思路是从左往右遍历 每个字符从右往左遍历到他的后一位置 dp数组标记当前位置往右对应匹配字符串左半边的最长序列长度的...
分类:其他好文   时间:2015-08-17 15:34:07    阅读次数:196
[LeetCode] Palindrome Partitioning
Palindrome Partitioning Given a string s, partition s such that every substring of the partition is a palindrome. Return all possible palindrome partitioning of s. For example, given s = "a...
分类:其他好文   时间:2015-08-16 18:22:35    阅读次数:102
UVa 401 - Palindromes
https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=342A regular palindrome is a string of numbers or letters that is the same forward as backward. For examp...
分类:其他好文   时间:2015-08-16 16:42:58    阅读次数:129
Palindrome Number && Reverse Number
Problem I:判断数字是不是回文字符串形式Determine whether an integer is a palindrome. Do this without extra space.click to show spoilers.Some hints:Could negative int...
分类:其他好文   时间:2015-08-16 13:47:58    阅读次数:151
Palindrome Number
Determine whether an integer is a palindrome. Do this without extra space.思路:将原数字从各位数字开始拆分成两部分,最终比较两个数字的大小即可。public boolean isPalindromeII(int x) { .....
分类:其他好文   时间:2015-08-16 12:14:26    阅读次数:125
poj1159 Palindrome
PalindromeTime Limit:3000MSMemory Limit:65536KTotal Submissions:44186Accepted:15050DescriptionA palindrome is a symmetrical string, that is, a string ...
分类:其他好文   时间:2015-08-15 16:20:33    阅读次数:120
1561条   上一页 1 ... 84 85 86 87 88 ... 157 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!