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
Prime
Palindrome
s 一亿以内的质数回文数
Description The number 151 is a prime
palindrome
because it is both a prime number and a
palindrome
·
2015-11-01 15:56
Prim
Partitioning by
Palindrome
s
We say a sequence of characters is a
palindrome
if it is the same written forwards and backwards
·
2015-11-01 15:42
partition
pku 1159
Palindrome
DP LCS 变形
http://poj.org/problem?id=1159 给定一字符串,问最少插入多少字符能使该字符串变成回文串。只要求出该字符串与其逆串的公共子序列,然后然后用n减去就得结果。这里卡内存,可以将f[5007][5007]定义成short int 型,计算后能险过,所以这里最好采用滚动数组。 View Code #include <cstdio> #include
·
2015-11-01 14:50
pku
LA 2889 (找规律)
Palindrome
Numbers
输出第n个回文数。 规律就是一位和两位的回文数各有9个,三位四位的回文数各有90个,以此类推。 给出n,可以先判定一下第n个回文数的位数,然后后面也不难推,但是有很多细节需要注意。 1 #include <cstdio> 2 #include <algorithm> 3 #include <cassert> 4 using names
·
2015-11-01 14:55
number
[Project Euler] Problem 4
The largest
palindrome
made from the product of two 2-digit numbers is 9009 = 91 99.
·
2015-11-01 13:24
project
Palindrome
Linked List
Palindrome
Linked List 问题: Given a singly linked list, determine if it is a
palindrome
.
·
2015-11-01 13:15
list
【leetcode刷题笔记】
Palindrome
Partitioning II
Given a string s, partition s such that every substring of the partition is a
palindrome
·
2015-11-01 13:53
partition
回文字符串的判断代码
include <stdio.h> 2 #include <stdbool.h> 3 #include <string.h> 4 5 bool is
Palindrome
Number
·
2015-11-01 12:47
字符串
UVALive 4868
Palindrome
ter 暴力
F -
Palindrome
ter Time Limit:3000MS Memory Limit:0KB  
·
2015-11-01 09:04
live
Codeforces Round 486C -
Palindrome
Transformation 贪心
Palindrome
Transformation time limit per test 1 second memory limit per test 256 megabytes
·
2015-11-01 09:55
codeforces
POJ 3974
Palindrome
Palindrome
Time Limit:15000MS Memory Limit:65536KB &
·
2015-11-01 08:39
poj
《leetCode》:
palindrome
Number
题目描述Determinewhetheranintegerisa
palindrome
.Dothiswithoutextraspace.题目大意:即检测一个数是否为回文数,不开辟额外的空间思路比较简单第一步
u010412719
·
2015-10-31 22:00
LeetCode
palindrome
URAL 1297
Palindrome
URAL_1297 找回文串最直观的一个算法就是枚举中间的点,然后向两边查找,看最后能拓展多远,但是这样是n^2的算法,利用后缀数组可以达到O(nlogn)的复杂度。 其实在枚举中间的点之后,向外拓展多远是取决于两个方向相反的字符串的公共前缀的,而如果利用后缀数组我们就可以在O(logn)的时间内找到这两个字符串公共前缀最长是多少。 &nb
·
2015-10-31 19:59
ROM
leetcode]
Palindrome
Partitioning IIMar
Palindrome
Partitioning II Mar Given a string s, partition s such that every substring
·
2015-10-31 18:19
partition
Leetcode 234
Palindrome
Linked List
Given a singly linked list, determine if it is a
palindrome
.
·
2015-10-31 18:20
LeetCode
LeetCode Shortest
Palindrome
Given a string S, you are allowed to convert it to a
palindrome
by adding characters in front of it.
·
2015-10-31 18:07
LeetCode
Longest Palindromic Substring
关键在于写好helper public class Solution { public String longest
Palindrome
(String s) { if(s
·
2015-10-31 17:40
substring
关于回文 C++
algorithm> #include <string> #include <iostream> using namespace std; //bool Is
Palindrome
·
2015-10-31 16:11
C++
leetcode[9]
Palindrome
Number
Determine whether an integer is a
palindrome
. Do this without extra space.
·
2015-10-31 16:07
LeetCode
Palindrome
Partitioning II
Given a string s, partition s such that every substring of the partition is a
palindrome
·
2015-10-31 15:09
partition
Palindrome
Partitioning
https://leetcode.com/problems/
palindrome
-partitioning/ Given a string s, partition s
·
2015-10-31 15:08
partition
【leetcode】Valid
Palindrome
题目简述: Given a string, determine if it is a
palindrome
, considering only alphanumeric characters and
·
2015-10-31 15:56
LeetCode
【leetcode】
Palindrome
Number
题目简述: Determine whether an integer is a
palindrome
.
·
2015-10-31 15:48
LeetCode
【URAL】1297
Palindrome
1 #include<cstdio> 2 #include<cstring> 3 #include<algorithm> 4 using namespace std; 5 #define MAXN 2200 6 #define MAXM 12 7 char s[MAXN],t[MAXN]; 8 int wa[MAXN
·
2015-10-31 15:30
ROM
[LeetCode] Valid
Palindrome
代码: 1 class Solution { 2 public: 3 bool is
Palindrome
(string s) { 4 transform(s.begin
·
2015-10-31 15:16
LeetCode
[LeetCode] Valid
Palindrome
代码: class Solution { public: bool isValid(string s) { string left = "([{"; string right = ")]}"; stack<char> stk; for(auto c : s
·
2015-10-31 15:16
LeetCode
poj 3280 Cheapest
Palindrome
(DP)
http://poj.org/problem?id=3280 对字符串进行增删操作使其形成回文串,每次操作都有其对应的花费,求最小花费。 典型DP,dp[i][j]为使str[j, i]形成回文的最小花费。 若str[j]==str[i],则dp[i][j]由dp[i-1][j+1]而来。 若str[j]!=str[i],则dp[i][j]=min(dp[i-1][j]+v[dat
·
2015-10-31 15:52
heap
poj 1159 回文词
Description A
palindrome
is a symmetrical string, that is, a string read identically from left to right
·
2015-10-31 15:18
poj
POJ 3280 Cheapest
Palindrome
Cheapest
Palindrome
Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 4592
·
2015-10-31 14:33
heap
hdu 2029
Palindrome
s _easy version
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2029 题目大意:回文数,即第一个和最后一个相同,第二个和倒数第二个相同、、、、以此类推 注意字符的输入,以及计算字符长度的位置。还有要注意清流哦~ 1 #include <stdio.h> 2 #include <string.h> 3 int main (vo
·
2015-10-31 13:12
version
LeetCode
Palindrome
Linked List
Given a singly linked list, determine if it is a
palindrome
.Follow up:Could you do it in O(n) time
·
2015-10-31 12:58
LeetCode
天题系列:
Palindrome
Partitioning II
Given a string s, partition s such that every substring of the partition is a
palindrome
·
2015-10-31 12:38
partition
Palindrome
Partitioning
正常dfs public class Solution { public ArrayList<ArrayList<String>> partition(String s) { ArrayList<ArrayList<String>> res = new ArrayList<ArrayList<String&
·
2015-10-31 12:37
partition
Valid
Palindrome
int a = 'A'这种写法,以及 s.trim(); s = s.toUpperCase(); public class Solution { public boolean is
Palindrome
·
2015-10-31 12:33
ROM
Palindrome
Number
Palindrome
Number Determine whether an integer is a
palindrome
. Do this without extra space.
·
2015-10-31 12:00
number
Valid
Palindrome
Description: Given a string, determine if it is a
palindrome
, considering only alphanumeric characters
·
2015-10-31 12:05
ROM
usaco 1.5.2——pprime
Prime
Palindrome
s 回文质数 描述 因为151即是一个质数又是一个回文数(从左到右和从右到左是看一样的),所以 151 号是回文质数。
·
2015-10-31 11:38
USACO
(SPOJ5)The Next
Palindrome
A positive integer is called a
palindrome
if its representation in the decimal system is the
·
2015-10-31 11:41
ext
C++程序设计实践指导1.15找出回文数改写要求实现
gt; using namespace std; struct LinkNode { int data; LinkNode *next; }; class
PALINDROME
·
2015-10-31 11:25
程序设计
[ACM_动态规划]
Palindrome
http://acm.hust.edu.cn/vjudge/contest/view.action?cid=28415#problem/D 题目大意:给一个长为n的字符串,问最少插入几个字符成回文串 解题思路:总长-最长公共(原来的和其倒过来的串)子序列(LCS) 知识详解——LCS:给出两个子序列A,B,求长度最大的公共子序列(如152687和2356984——
·
2015-10-31 11:33
动态规划
【原】 POJ 1159
Palindrome
回文 动态规划 解题报告
http://poj.org/problem?id=1159 方法1: c[i][j]表示:s[i...j]子字符串中最少需要插入多少个字符形成回文 c[1][n]为最终结果 初始值: c[i][i] = 0 c[i][j] = 0,if i>j 递归式: c[i][j] = c[i+1][j-1],if s[i]==s[j] &nbs
·
2015-10-31 11:38
动态规划
LeetCode -
Palindrome
Partitioning II
Palindrome
Partitioning II 2014.2.26 22:57 Given a string s, partition s such that every
·
2015-10-31 11:30
partition
LeetCode -
Palindrome
Partitioning
Palindrome
Partitioning 2014.2.26 22:36 Given a string s, partition s such that every
·
2015-10-31 11:29
partition
【leetcode刷题笔记】Valid
Palindrome
Given a string, determine if it is a
palindrome
, considering only alphanumeric characters and ignoring
·
2015-10-31 11:27
LeetCode
【leetcode刷题笔记】
Palindrome
Partitioning
Given a string s, partition s such that every substring of the partition is a
palindrome
·
2015-10-31 11:27
partition
1.5.2 Prime
Palindrome
s
/* ID: awsd1231 PROG: pprime LANG: C++ */ #include<iostream> #include<cstdio> using namespace std; int mayAns[] =
·
2015-10-31 11:40
Prim
1.2.5Dual
Palindrome
s
/* ID: awsd1231 PROG: dualpal LANG: C++ */ #include<iostream> #include<cstdio> #include<cmath> #include<cstring>
·
2015-10-31 11:39
dual
URAL 1297
Palindrome
(后缀数组求最长回文子串)
Palindrome
Time Limit:1000MS Memory Limit:16384KB  
·
2015-10-31 11:47
后缀数组
UVA 10716 Evil Straw Warts Live(贪心)
Problem D: Evil Straw Warts Live A
palindrome
is a string of symbols that is equal to itself
·
2015-10-31 11:14
live
poj1159
Palindrome
Time Limit: 3000MS Memory Limit: 65536K Total Submissions: 36646
·
2015-10-31 10:14
poj
上一页
70
71
72
73
74
75
76
77
下一页
按字母分类:
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
其他