Splits the string 时间限制:1000 ms | 内存限制:65535 KB 难度:3 Hrdv is interested in a string,especially the palindrome string.So he wants some palindrome string ...
分类:
编程语言 时间:
2017-08-25 21:44:14
阅读次数:
420
As we all know,a palindrome number is the number which reads the same backward as forward,such as 666 or 747.Some numbers are not the palindrome numbe ...
分类:
其他好文 时间:
2017-08-25 15:03:03
阅读次数:
147
问题1:插入/删除字符使得原字符串变成一个回文串且代价最小 poj 3280 Cheapest Palindrome 题意:给出一个由m中字母组成的长度为n的串,给出m种字母添加和删除花费的代价,求让给出的串变成回文串的代价。 Sol: 插入和删除等价,因此只需要保留 min(插入代价,删除代价)作 ...
分类:
其他好文 时间:
2017-08-23 10:38:30
阅读次数:
258
一、问题的描述 回文序列(Palindromic sequence, Palindrome)是指正向遍历和反向遍历完全相同的序列,例如字符串“AAAAA”显然是一个回文序列,又如字符串“ABC@CBA”也是一个回文序列。现在,我们要在一个(字符)序列中找出最长回文子序列的长度。例如字符序列"BBAB ...
分类:
编程语言 时间:
2017-08-22 16:53:18
阅读次数:
279
简单的思路: 深度优先搜索: python python 中传参数? foo=1 # 指向int数据类型的foo(foo 没有类型) lfoo=[1]# 指向list类型的lfoo。 python中 strings, tuples, numbers 不可更改, list, dict 可更改 foo= ...
分类:
其他好文 时间:
2017-08-21 18:50:59
阅读次数:
213
http://acm.hdu.edu.cn/showproblem.php?pid=6156 【AC】 1 #include<bits/stdc++.h> 2 using namespace std; 3 typedef long long ll; 4 const ll mod=1e9+7; 5 i ...
分类:
其他好文 时间:
2017-08-21 00:17:51
阅读次数:
220
Time Limit: 8000/4000 MS (Java/Others) Memory Limit: 256000/256000 K (Java/Others)Total Submission(s): 662 Accepted Submission(s): 351 Problem Descrip ...
分类:
其他好文 时间:
2017-08-21 00:17:00
阅读次数:
245
最近死磕较高难度的题目 深感自己的基本数据结构掌握不够熟练 因此 刷题较慢了些 刷了一道简单的题目涨涨自信 题目:Given a string which consists of lowercase or uppercase letters, find the length of the longe ...
分类:
其他好文 时间:
2017-08-20 21:11:15
阅读次数:
189
数据好像极限,按理来说二分是可以过得,就是被卡主 ...
分类:
其他好文 时间:
2017-08-20 19:54:08
阅读次数:
153
Palindrome Function Time Limit: 8000/4000 MS (Java/Others) Memory Limit: 256000/256000 K (Java/Others)Total Submission(s): 559 Accepted Submission(s): ...
分类:
其他好文 时间:
2017-08-20 18:39:38
阅读次数:
143