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
Twitter OA prepare: Anagram is A
Palindrome
Only one character with odd occurrence is allowed since in a
palindrome
maximum number of character with
·
2015-11-11 01:04
twitter
Leetcode:
Palindrome
Partitioning
Given a string s, partition s such that every substring of the partition is a
palindrome
.
·
2015-11-11 01:01
partition
Leetcode:
Palindrome
Numbers
Determine whether an integer is a
palindrome
. Do this without extra space.
·
2015-11-11 01:28
LeetCode
hdu 1318
Palindrome
s(回文词)
/*
Palindrome
s Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 655
·
2015-11-11 00:41
HDU
poj1159——回文,lcs
poj1159——回文,lcs
Palindrome
Time Limit: 3000MS Memory Limit: 65536K Total
·
2015-11-11 00:49
poj
Palindrome
subsequence
Palindrome
subsequence Time Limit: 2000/1000
·
2015-11-11 00:31
sequence
USACO Prime
Palindrome
s 构造回文数
构造回文的时候看了HINT 其中是这么写的: Generate
palindrome
s by combining digits properly.
·
2015-11-10 23:32
USACO
Ural 1297
Palindrome
【最长回文子串】
最长回文子串 相关资料: 1、暴力法 2、动态规划 3、中心扩展 4、Manacher法 http://blog.csdn.net/ywhorizen/article/details/6629268 http://blog.csdn.net/kangroger/article/details/37742639 在看后缀数组的时候碰到的这道题目 不过
·
2015-11-10 23:25
ROM
URAL 1297
Palindrome
后缀数组
D -
Palindrome
Time Limit:1000MS Memory Limit:65536KB  
·
2015-11-10 23:29
后缀数组
OpenJudge/Poj 1159
Palindrome
id=1159 2.题目:
Palindrome
Time Limit: 3000MS Memory Limit: 65536K Total Submissions
·
2015-11-10 22:47
open
POJ 3974
Palindrome
回文数 Manacher算法
原文地址 http://www.2cto.com/kf/201210/164253.html 该题就是求一个字符串的最长回文子串,就是一个满足本身是回文的最长的子串。该题貌似可以用后缀数组和扩展kmp做,但是好像后缀数组貌似会tle,改学了下一个专门的叫Manacher算法的东西。。。 该算法说起来也不是太复杂,比较容
·
2015-11-10 22:06
poj
POJ 1159
Palindrome
解题思路:求解原串与其反串的LCS #include < iostream > using namespace std; int main(){ int n,ai,bi,i,j,opt[ 2 ][ 5001 ] = { 0
·
2015-11-10 21:23
poj
[leetcode]
Palindrome
Number
public class Solution { public boolean is
Palindrome
(int x) { // Start typing your Java
·
2015-11-10 21:13
LeetCode
leetcode
Palindrome
Number 判断回文数
classSolution{ public: boolis
Palindrome
(intx){ if(xmark) { temp=temp*10+a[mark++]; } if(temp==x) returntrue
fuyan159357
·
2015-11-09 20:00
LeetCode
LeetCode Palidrome Number
class Solution { public: bool is
Palindrome
(int x) { if (x < 0) return false;
·
2015-11-09 14:53
LeetCode
LeetCode Valid
Palindrome
class Solution { public: bool is
Palindrome
(string s) { int len = s.length();
·
2015-11-09 14:34
LeetCode
[LeetCode 125] Valid
Palindrome
https://leetcode.com/problems/valid-
palindrome
/ Given a string, determine if it is a
palindrome
,
·
2015-11-09 14:38
LeetCode
acdream 1019
Palindrome
(哈希)
题目链接:http://www.acdream.net/problem.php?id=1019 题意:给定一个字符串str,两个操作: (1)C a x 将位置a上的字母改为x (2)Q a b 询问str[a,……b]是不是回文串。 思路:用哈希存储每个子串。具体方法是用上树状数组进行快速统计。 #include <iostream> #include <stdi
·
2015-11-09 14:51
ROM
POJ 3280 Cheapest
Palindrome
简单DP
观察题目我们可以知道,实际上对于一个字母,你在串中删除或者添加本质上一样的,因为既然你添加是为了让其对称,说明有一个孤立的字母没有配对的,也就可以删掉,也能满足对称。 故两种操作看成一种,只需要保留花费少的那个即可 然后 令 dp[i][j]表示从位置i到j的子串转化为回文串需要的次数 若 s[i]== s[j] 则dp[i][j] = dp[i + 1][j - 1] 否则 d
·
2015-11-09 14:31
heap
UVa 10617 Again
Palindrome
s / 记忆化搜索
删除若干个字母后 剩下的是回文串 求有多少个 记忆化搜索 dp[i][j]表示i j 之间有多少个 其实递推也可以的 long long #include <stdio.h> #include <string.h> long long dp[70][70]; char a[70]; long long n; long long dfs(long long
·
2015-11-09 13:09
ROM
下沙友好群暑假训练二
fraud/ ——by fraud A -
Palindrome
s
·
2015-11-09 13:06
动态规划练习 8
题目:
Palindrome
(POJ 1159) 链接:http://acm.pku.edu.cn/JudgeOnline/problem?
·
2015-11-09 12:10
动态规划
HappyLeetcode2: Valid
Palindrome
题目 解题步骤 对字符串进行处理,字符小写,去掉多余标点。 对空字符串的情况进行判断。 建立一个新的字符串对象,存入原字符串翻转后的结果 如果这两个字符串相等,那么返回True,否则,返回False。 我的答案 第1版: class Solution: # @param s, a string &nbs
·
2015-11-09 12:54
LeetCode
Leetcode#131
Palindrome
Partitioning
看来数据量比较小,关于回文串的判断没有使用动态规划也可以过 代码: 1 vector<vector<string> > res; 2 3 bool
palindrome
p
·
2015-11-09 12:06
partition
Leetcode#5 Longest Palindromic Substring
代码: 1 string longest
Palindrome
(string s) {
·
2015-11-09 12:58
substring
Leetcode#132
Palindrome
Partitioning II
原题地址 动态规划题。 最直观的想法就是用cut[i][j]表示子串s[i..j]的最小分割数,则有如下规则: 1. 如果s[i..j]是回文串,则cut[i][j]=0 2. 如果s[i..j]不是回文串,则枚举分割点,将原字符串切成两个子串,求解子问题。递推公式:cut[i][j] = min{cut[i][k] + cut[k+1][j] + 1},i <= k
·
2015-11-09 12:46
partition
(Problem 4)Largest
palindrome
product
The largest
palindrome
made from the product of two 2-digit numbers is 9009 = 91 99.
·
2015-11-09 12:18
ROM
Palindrome
Number
https://oj.leetcode.com/problems/
palindrome
-number/ Determine whether an integer is a
palindrome
.
·
2015-11-09 11:06
number
USACO sec1.5 Prime
Palindrome
s
素回文数,打表。。 打表输出 # include <math.h> # include <time.h> # include <stdio.h> # define id(x) ((x)>>3) # define of(x) ((x)&0x7) # define get(x) ((pt[id(x)]>>of(
·
2015-11-08 17:09
USACO
ACM——回文
英语中单词
Palindrome
s指顺读倒读都一样的词语,比如radar
·
2015-11-08 16:15
ACM
HDU 4632
Palindrome
subsequence (区间DP)
题意 给定一个字符串,问有多少个回文子串(两个子串可以一样)。 思路 注意到任意一个回文子序列收尾两个字符一定是相同的,于是可以区间dp,用dp[i][j]表示原字符串中[i,j]位置中出现的回文子序列的个数,有递推关系: dp[i][j]=dp[i+1][j]+dp[i][j-1]-dp[i+1][j-1] (*) 如果i和j位置出现的字符相同,那么dp[i][j]可以由dp[i+1
·
2015-11-08 16:04
sequence
HDU 4632
Palindrome
subsequence (区间DP)
题意 给定一个字符串,问有多少个回文子串(两个子串可以一样)。 思路 注意到任意一个回文子序列收尾两个字符一定是相同的,于是可以区间dp,用dp[i][j]表示原字符串中[i,j]位置中出现的回文子序列的个数,有递推关系: dp[i][j]=dp[i+1][j]+dp[i][j-1]-dp[i+1][j-1] (*) 如果i和j位置出现的字符相同,那么dp[i][j]可以由dp[i+1
·
2015-11-08 16:47
sequence
POJ 3376 Finding
Palindrome
s(扩展kmp+trie)
题目链接:http://poj.org/problem?id=3376 题意:给你n个字符串m1、m2、m3...mn 求S = mimj(1=<i,j<=n)是回文串的数量 思路:我们考虑第i个字符串和第j个字符串能构成组合回文串要满足的条件: 1、i的长度小于j,那么i一定是j的反串的前缀,且j的反串剩下的后缀是回文串 2、i的长度等于j,那么i等于j的反串 3、i的长度
·
2015-11-08 16:38
find
POJ 3974
Palindrome
(最长回文子串)
题目链接:http://poj.org/problem?id=3974 题意:求一给定字符串最长回文子串的长度 思路:直接套模板manacher算法 code: 1 #include <cstdio> 2 #include <cstring> 3 #include <algorithm> 4 using namespace std;
·
2015-11-08 16:35
poj
判断一个字符串在至多删除k个字符后是否为回文串
id=6287528252407808 问题描述: A k-
palindrome
is a string which transforms into a
palindrome
on removing
·
2015-11-08 16:42
字符串
【One more】poj1159
Palindrome
又是一道水题…总觉得今天光做水题了… . 题目是poj1159(http://poj.org/problem?id=1159),属于一道简单的动归。 题目如下。 【题目描述】给你一个字符串,你可以向里面的任意位置插入字符,问让这个串成为回文串最少要插入多少字符。
·
2015-11-08 14:40
more
leetcode:
Palindrome
Number (判断数字是否回文串) 【面试算法题】
题目: Determine whether an integer is a
palindrome
. Do this without extra space.
·
2015-11-08 14:35
LeetCode
[hackerrank]
Palindrome
Index
简单题。 #include <iostream> #include <string> using namespace std; int main() { int T; cin >> T; while (T--) { string s; cin >> s;
·
2015-11-08 13:04
index
*[topcoder]PalindromicSubstringsDiv2
c=problem_statement&pm=12967 计算一个字符串里
Palindrome
的数量。我的DP方法需要n^2的空间。
·
2015-11-08 13:56
substring
LightOJ 1044
Palindrome
Partitioning(记忆化搜索)
题目链接:http://www.lightoj.com/volume_showproblem.php?problem=1044 题意:给出一个字符串,问将字符串最少截成多少段可使每段都是一个回文串? 思路:预处理ok[i][j],表示[i,j]之间是不是回文串。然后记忆化搜索即可。。。我一开始没有预处理ok数组直接记忆化搜索的,TLE了半天。。。。 View Code
·
2015-11-08 11:30
partition
leecode 回文字符串加强版
Given a string, determine if it is a
palindrome
, considering only alphanumeric characters and ignoring
·
2015-11-08 11:49
code
Palindrome
Partitioning
Palindrome
Partitioning Given a string s, partition s such that every substring of the
·
2015-11-08 11:53
partition
Valid
Palindrome
Valid
Palindrome
Given a string, determine if it is a
palindrome
, considering only alphanumeric characters
·
2015-11-08 11:41
LeetCode
Palindrome
Partitioning II
Palindrome
Partitioning II Given a string s, partition s such that every substring
·
2015-11-08 11:35
partition
uva401 -
Palindrome
s结题报告
题目地址 : http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&category=&problem=342&mosmsg=Submission+received+with+ID+13517947 好久没有刷
·
2015-11-08 10:19
ROM
Leetcode#9
Palindrome
Number
,左右指针,不断收缩判断 方法II: 将数字翻转,判断翻转后的数字是否相等,溢出也没关系因为溢出以后更加不可能相等了 代码(方法II): 1 bool is
Palindrome
·
2015-11-08 10:12
LeetCode
Leetcode#125 Valid
Palindrome
原题地址 isalnum:判断是否是字符或数字 toupper:将字符转换成大写,非字符不变 代码: 1 bool is
Palindrome
(string s
·
2015-11-08 10:11
LeetCode
(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 the pa
·
2015-11-08 09:37
double
【 2013 Multi-University Training Contest 4 】
HDU 4632
Palindrome
subsequence dp[x][y]表示区间[x,y]构成回文串的方案数。
·
2015-11-07 15:55
test
[Swust OJ 797]--Palindromic Squares(回文数水题)
problem/797/ Time limit(ms): 1000 Memory limit(kb): 10000 Description
Palindrome
s
·
2015-11-07 15:20
ROM
上一页
68
69
70
71
72
73
74
75
下一页
按字母分类:
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
其他