E-COM-NET
首页
在线工具
Layui镜像站
SUI文档
联系我们
推荐频道
Java
PHP
C++
C
C#
Python
Ruby
go语言
Scala
Servlet
Vue
MySQL
NoSQL
Redis
CSS
Oracle
SQL Server
DB2
HBase
Http
HTML5
Spring
Ajax
Jquery
JavaScript
Json
XML
NodeJs
mybatis
Hibernate
算法
设计模式
shell
数据结构
大数据
JS
消息中间件
正则表达式
Tomcat
SQL
Nginx
Shiro
Maven
Linux
palindrome
uva--401
Palindrome
s
题目:
Palindrome
s解题思路:判断是否为回文:判断字符串前n/2的第i个字符与第n-1-i个字符是否相同,都相同就是回文;判断是否为mirrored,判断字符串前n/2字符的第n-1-i个字符是否与第
u012997373
·
2013-12-03 20:00
ural1297之最长回文子串
space=1&num=12971297.
Palindrome
Timelimit:1.0secondMemorylimit:64MBThe“U.S.Robots”HQhasjustreceivedaratheralarminganonymousletter.Itstatesthattheagentfromthecompeting
xingyeyongheng
·
2013-11-29 16:00
leetcode-
Palindrome
Partitioning
Givenastring s,partition s suchthateverysubstringofthepartitionisa
palindrome
.Returnallpossible
palindrome
partitioningof
u012841335
·
2013-11-28 14:00
递归
搜索
USACO Section 1.2 Dual
Palindrome
s
/* ID:lucien23 PROG:dualpal LANG:C++ */ #include #include #include #include usingnamespacestd; stringnum2string(intnum,intbaseNum); intmain() { ifstreaminfile("dualpal.in"); ofstreamoutfile("dualpal.
LucienDuan
·
2013-11-25 21:00
Algorithm
C++
USACO
Palindrome
Partitioning 分割字符串为回文@LeetCode
DFS回溯又一经典应用packageLevel4; importjava.util.ArrayList; importjava.util.Hashtable; /** *
Palindrome
Partitioning
hellobinfeng
·
2013-11-22 00:00
LeetCode:Valid
Palindrome
题目如下:(题目链接) Given a string, determine if it is a
palindrome
, considering only alphanumeric characters
·
2013-11-20 23:00
LeetCode
leetcode之
Palindrome
Partitioning I&II
1
Palindrome
Partitioning问题来源:
Palindrome
Partitioning该问题简单来说就是给定一个字符串,将字符串分成多个部分,满足每一部分都是回文串,请输出所有可能的情况。
yutianzuijin
·
2013-11-20 21:00
LeetCode
dp
深搜
回文串
(Problem 36)Double-base
palindrome
s
The decimal number, 585 = 10010010012 (binary), is palindromic in both bases. Find the sum of all numbers, less than one million, which are palindromic in base 10 and base 2. (Please note that
20131007
·
2013-11-17 21:00
c
欧拉计划
第12周项目7-建立1000以内的素数、回文数、回文素数多文件组织
*/main.cpp#include#includeusingnamespacestd;boolis
Palindrome
(
u012369559
·
2013-11-17 11:00
[LeetCode]
Palindrome
Number
题目要求:Determinewhetheranintegerisa
palindrome
.Dothiswithoutextraspace.Somehints:Couldnegativeintegersbe
palindrome
s
zhouworld16
·
2013-11-13 21:00
LeetCode
C++
number
palindrome
Palindrome
Number
难度:3值得注意的地方:输入为1000110001,每次删掉最高位和最低位时bit/=100而不是bit/=10,求一个数的最高位的方式也值得注意一下题意:输入一个int判断是否为回文,不允许转化为字符串进行判断解法:每次获得数的最高位和最低位判断,快速获得最高位的的方法见代码classSolution { public: intHighestBit(intx)//4312返回1000 { int
zhangwei1120112119
·
2013-11-13 18:00
Longest Palindromic Substring
http://blog.csdn.net/hopeztm/article/details/7932245讲的比较详细然后是我的代码classSolution { public: stringlongest
Palindrome
zhangwei1120112119
·
2013-11-13 16:00
LeetCode题解:
Palindrome
Number
Palindrome
NumberDeterminewhetheranintegerisa
palindrome
.Dothiswithoutextraspace.思路:题目要求只能用O(1)的空间,所以不能考虑把它转化为字符串然后
MagiSu
·
2013-11-13 11:00
LeetCode
LeetCode 之
Palindrome
Number
原题:Determinewhetheranintegerisa
palindrome
.Dothiswithoutextraspace.clicktoshowspoilers.Somehints:Couldnegativeintegersbe
palindrome
s
zhao123h
·
2013-11-12 17:00
LeetCode
判断是否回文数
*作者:赵焱 *完成日期:2013年11月11日 *版本号:v1.0 *问题描述:判断是否回文数 */ #include usingnamespacestd; boolis
Palindrome
u012536154
·
2013-11-11 18:00
URAL 1989 Sub
palindrome
s(字符串HASH&线段树单点更新)
题意:给你长度为N的字符串,有M个操作,操作有两种类型(1)“changeia”,表示将第i个字符变成a,(2)“
palindrome
?jk”,询问[j,k]的字符串是否构成回文串。
shiqi_614
·
2013-11-10 22:00
poj 1159(回文串dp)
Palindrome
TimeLimit: 3000MS MemoryLimit: 65536KTotalSubmissions: 49315 Accepted: 16937DescriptionA
palindrome
isasymmetricalstring
A775700879
·
2013-11-10 16:00
第11周项目3(5)
#include #include usingnamespacestd; boolis
Palindrome
(int);//自定义函数的原型(即函数声明) intreverse(int); boolisPrime
u012370419
·
2013-11-10 13:00
第11周项目3(3)
#include usingnamespacestd; boolis
Palindrome
(int);//自定义函数的原型(即函数声明) intreverse(int); intmain() {
u012370419
·
2013-11-10 13:00
第11周项目3(2)
#include usingnamespacestd; boolis
Palindrome
(int);//自定义函数的原型(即函数声明) intmain() { intm; cin>>m;
u012370419
·
2013-11-10 13:00
Longest Palindromic Substring 在一个字符串里找最长回文子串@LeetCode
特别注意到有偶数个和奇数个
palindrome
的情况,以及两者的优先级不同!
hellobinfeng
·
2013-11-10 07:00
Palindrome
1297.
Palindrome
Timelimit:1.0secondMemorylimit:64MBThe“U.S.Robots”HQhasjustreceivedaratheralarminganonymousletter.Itstatesthattheagentfromthecompeting
u010422038
·
2013-11-09 16:00
UVA 10617 Again
Palindrome
又是回文 dp,记忆化搜索
题意:给出一个字符串,问又几种方法能够删除字符使得字符串变成回文。记忆化搜索即可。递归条件写错搞了老旧。。。代码:/* *Author:illuz *Blog:http://blog.csdn.net/hcbbt *File:uva10617.cpp *CreateDate:2013-11-0900:28:31 *Descripton:dp */ #include #include #defi
hcbbt
·
2013-11-09 09:00
dp
ACM
第11周项目11-判断一个三位数是否为回文数
*/#includeusingnamespacestd;boolis
palindrome
(intn);intmain(){ intm;
u012369559
·
2013-11-08 19:00
UVA 10739 String to
Palindrome
转换回文 dp递推
题意:给出一个字符串,可以添加删除字符,或替换字符,求把它变成回文的最少操作次数。可以用递推或者递归,其实递归更好理解,递推还要确定滚动方向。dp[i][j]表示字符i到j位置上最少需要几步构成回文。dp方法为:如果str[i]=str[j],dp[i][j]=dp[i+1][j-1];否则dp[i][j]=min(dp[i+1][j],dp[i][j-1],dp[i+1][j-1])+1由于定义
hcbbt
·
2013-11-08 15:00
dp
ACM
[LeetCode]
Palindrome
Partitioning II
Givenastring s,partition s suchthateverysubstringofthepartitionisa
palindrome
.Returntheminimumcutsneededfora
palindrome
partitioningof
bhwolf1987
·
2013-11-08 12:00
LeetCode
partition
Palindorme
第11周项目3--(2)判断是否为回文数
*/ #include usingnamespacestd; boolis
palindrome
(int);
u012369143
·
2013-11-07 16:00
订正:bool的运用——判断一个数是不是素数
2013年10月7日 问题描述: 样例输入: 样例输出: 问题分析:素数就是除了1和它本身以外没有可以被整除的数 */ #include usingnamespacestd; boolis
Palindrome
u012369162
·
2013-11-07 14:00
编制is
Palindrome
()
v1.0 *问题描述:判断参数是否是回文数 *样例输入:*样例输出: *问题分析:用简单的方法,学会活学活用 */ #includeusingnamespacestd;intmain(){ intis
Palindrome
u012369752
·
2013-11-07 14:00
bool的运用——判断一个数是不是回文数
2013年10月7日 问题描述: 样例输入: 样例输出: 问题分析:回文数就是从前往后读和从后往前读都是一样的数 */ #include usingnamespacestd; boolis
Palindrome
u012369162
·
2013-11-07 14:00
判断数字是否是回文数字(无需另外开销)
逆序数的求法在ReverseInteger中有publicbooleanis
Palindrome
(intx){ if(x<0){ returnfalse; } inta=x; inty=0; while
okiwilldoit
·
2013-11-06 16:00
HDU 4365
Palindrome
graph(找规律 快速幂取模)
Palindrome
graphTimeLimit:2000/1000MS(Java/Others) MemoryLimit:65536/32768K(Java/Others)TotalSubmission
opm777
·
2013-11-05 15:00
思维
leetcode
Palindrome
Partitioning I II
题1:Givenastring s,partition s suchthateverysubstringofthepartitionisa
palindrome
.Returnallpossible
palindrome
partitioningof
hefeiguo
·
2013-11-01 22:00
LeetCode
算法
搜索
动态规划
DFS
(字符串的处理4.7.16)POJ 1159
Palindrome
(让一个字符串变成回文串需要插入多少个字符...先逆序,在减去公共子序列的最大长度即可)
/* *POJ_1159.cpp * *Createdon:2013年10月29日 *Author:Administrator */ #include #include #include #include #include usingnamespacestd; constintmaxn=5005; charstr1[maxn],str2[maxn]; intmaxlen[2][maxn];
caihongshijie6
·
2013-10-29 09:00
Leetocde:
Palindrome
Partitioning II
Givenastring s,partition s suchthateverysubstringofthepartitionisa
palindrome
.Returntheminimumcutsneededfora
palindrome
partitioningof
doc_sgl
·
2013-10-28 23:00
dp
partition
DFS
palindrome
Leetocde
Leetcode:
Palindrome
Partitioning
Givenastring s,partition s suchthateverysubstringofthepartitionisa
palindrome
.Returnallpossible
palindrome
partitioningof
doc_sgl
·
2013-10-28 22:00
LeetCode
partition
DFS
palindrome
LeetCode题解:Valid
Palindrome
Valid
Palindrome
Givenastring,determineifitisa
palindrome
,consideringonlyalphanumericcharactersandignoringcases.Forexample
MagiSu
·
2013-10-27 08:00
LeetCode
Palindrome
Number 判断一个数字是否是回文数字@LeetCode
思路:递归比较数字的最低位和最高位,向中间逼夹packageLevel2; /** * *
Palindrome
Number * *Determinewhetheranintegerisa
palindrome
.Dothiswithoutextraspace
hellobinfeng
·
2013-10-25 03:00
URAL 1989 Sub
palindrome
s(多项式哈希+线段树)
URAL1989Sub
palindrome
s(多项式哈希+线段树)题意:给出一个字符串,长度为10^5,有m个操作m #include #include #definelsonl,m,rt usingnamespacestd
No__stop
·
2013-10-23 14:00
字符串
线段树
hdu 4365
Palindrome
graph
Palindrome
graphTimeLimit:2000/1000MS(Java/Others) MemoryLimit:65536/32768K(Java/Others)TotalSubmission
u010228612
·
2013-10-22 23:00
POJ 1159
Palindrome
题目大意:给出一个字符串,问添加多少个字符才可以使这个字符串成为回文串。解题办法:将字符串逆序,同原串进行最长公共子序列处理,串的长度减去最长子序的长度就是题解。注意:这个题对内存的控制十分严格,5000*5000int型数组是开不开的,可以开short型,也可以借这个题练习一下滚动数组。下面是代码:#include intmax(inta,intb) { if(a
lin375691011
·
2013-10-22 08:00
dp
poj
刷题
NYOJ练习题 Splits the string (简单动态规划)
Splitsthestring时间限制:1000 ms | 内存限制:65535 KB描述Hrdvisinterestedinastring,especiallythe
palindrome
string.Sohewantssome
palindrome
string.Asequenceofcharactersisa
palindrome
ifitisthesamewrittenforwardsandback
LYHVOYAGE
·
2013-10-20 17:00
c
动态规划
CodeForces - 7D
Palindrome
Degree
最近接触了一点字符串算法,其实也就是一个简单的最大回文串算法,给定字符串s,求出最大字符串长度。算法是这样的,用'#'将s字符串中的每个字符分隔,比如s=“aba”,分割后变成#a#b#a#,然后利用下面的算法:pre:mx←0 fori:=1ton-1 if(mx>i) p[i]=min(p[2*id-i],mx-i) elsep[i]=1 w
·
2013-10-20 11:00
codeforces
Valid
Palindrome
检查是否是有效的回文 @LeetCode
题目:检查一个字符串是否是有效的回文思路:左右指针,跳过无需检查的字符,然后比较所指的字符是否相等packageLevel2; /** *Valid
Palindrome
* *Givenastring
hellobinfeng
·
2013-10-18 23:00
POJ 3974
Palindrome
同上题……/* Author:Speedcell Update:2013-10-08 Version:soppYcell2.3 */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #incl
speedcell4
·
2013-10-17 23:00
POJ3974
Palindrome
(manacher算法)
POJ3974
Palindrome
(manacher算法)题意:非常简单,求一个串的最长回文子串。解题思路:本来用后缀数组也能解,但是串的长度为10^6,后缀数组就做不了了。
No__stop
·
2013-10-17 16:00
字符串
判断一个整数是否是回文数
Palindrome
Number
Determinewhetheranintegerisa
palindrome
.Dothiswithoutextraspace.思路:1、不可以借助辅助空间。即要求空间复杂度为O(1)。
luckyjoy521
·
2013-10-13 16:00
poj 3376 Finding
Palindrome
s(扩展kmp+trie)
poj3376Finding
Palindrome
s(扩展kmp+trie)分类: 字符串2013-10-0918:11 89人阅读 评论(0) 收藏 举报扩展kmppoj3376Finding
Palindrome
s
pi9nc
·
2013-10-09 21:00
字符串
poj 3376 Finding
Palindrome
s(扩展kmp+trie)
poj3376Finding
Palindrome
s(扩展kmp+trie)题意:给出n个字符串,问这n个字符串两两链接(一共有n^2中连接方法),组成的所有的字符串中,有多少个回文串。好题!!!
No__stop
·
2013-10-09 18:00
扩展kmp
[LeetCode]
Palindrome
Partitioning
Palindrome
Partitioning Givenastring s,partition s suchthateverysubstringofthepartitionisa
palindrome
.Returnallpossible
palindrome
partitioningof
a83610312
·
2013-10-08 23:00
上一页
90
91
92
93
94
95
96
97
下一页
按字母分类:
A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
Q
R
S
T
U
V
W
X
Y
Z
其他