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
Palindromes
zoj 2744
Palindromes
Palindromes
Time Limit: 1 Second Memory Limit: 32768 KB A regular palindrome
·
2015-11-11 13:01
ROM
Palindromes
要注意:单个字符是没有对应反序串的。 几个测试: 1 NOTAPALINDROME -- is not a palindrome. 2 3 ISAPALINILAPASI -- is a regular palindrome. 4 5 2A3MEAS -- is a mirrored string. 6 7 ATOYOTA -- is a mirrored palindrome. 8
·
2015-11-11 12:03
ROM
POJ 3376 Finding
Palindromes
题目大意: 给你N个字符串, 你可以两两连接得到N * N个字符串, 问之中回文串的数量. N个字符串的长度和加起来不超过2000000. 简要分析: 无比恶心的题啊... 我们顺次考虑每个字符串放在前面的情况. 假设字符串i放在前面, j放在后面, 那么这个串是回文有两种情况: 1) 若i的长度小于j, 则i是j反串的前缀, 且j反串剩下的后缀是回文串. 2) 若i的
·
2015-11-11 11:09
find
Palindrome Number
Some hints: Could negative integers be
palindromes
? (ie, -1) If you are thinking of converting t
·
2015-11-11 10:45
number
UVA 401 -
Palindromes
(字符串)
题目链接 无语+ 无奈 10+的错误,看不懂的题意,不懂为何会AC,为神马删了对O和0的判断就AC。。。真受不了。。。 1 #include <stdio.h> 2 #include <string.h> 3 int main() 4 { 5 int i,j,len,x,y; 6 char p[1000],o[1000]; 7
·
2015-11-11 10:43
字符串
SRM 600 DIV1
A 按位讨论,取最小值; B 数据范围不大,首先要确定枚举角度; 状压枚举
palindromes
的列比较科学; 列确定后,目标就是求获得rcnt行的最小代价: dp[i][cnt
·
2015-11-11 08:21
div
[LeetCode] Palindrome Number
Some hints: Could negative integers be
palindromes
?
·
2015-11-11 08:03
LeetCode
USACO section1.2 Dual
Palindromes
给出 n 和 s (十进制),打印 s 后面 n 个在 2-10 进制中至少两个进制下为回文数的十进制表示。 /* PROG: dualpal LANG: C++ */ # include <cstdio> # include <cstring> int n, s; void strRev(char *s) { char ch;
·
2015-11-11 07:09
USACO
USACO 1.5 Prime
Palindromes
1.生成回文数 (100000000以内)大概20000个 2.判断素数 生成回文数的算法思想: 分别生成数位是奇odd,和数位是偶even的回文数, 对于串1234, 翻转一下 4321,再接上就生成了一个回文数 ,odd:1234321 even:12344321 实现的方法可以多种多样。我用的是递归的方法。 代码 1
·
2015-11-11 05:53
USACO
uva 353 - Pesky
Palindromes
// 8ms 2010-05-14 15:09:52 2 // ac(1) 3 // Type: string
Palindromes
·
2015-11-11 05:44
ROM
[LeetCode] Palindrome Number
Some hints: Could negative integers be
palindromes
?
·
2015-11-11 04:08
LeetCode
Mnemonics and
Palindromes
(DP)
题目链接 本来用区间DP,3次方的复杂度,T了,看了看题解,降维,直接二次方的复杂度可以解。然后折腾一下输出路径。。终于过了。 1 #include <cstring> 2 #include <cstdio> 3 #include <string> 4 #include <iostream> 5 #include <al
·
2015-11-11 04:11
ROM
USACOTrainning.Prime
Palindromes
题目大意是给两个整数a,b,然后求出这之间的所有回文素数。 枚举回文的数,其实枚举回文的数加上判断宿舍的时间不是很长的。 1 #include < iostream > 2 #include < string > 3 #include
·
2015-11-11 03:44
USACO
hdu 1318
Palindromes
(回文词)
/*
Palindromes
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 655
·
2015-11-11 00:41
HDU
USACO Prime
Palindromes
构造回文数
构造回文的时候看了HINT 其中是这么写的: Generate
palindromes
by combining digits properly.
·
2015-11-10 23:32
USACO
UVa 10617 Again
Palindromes
/ 记忆化搜索
删除若干个字母后 剩下的是回文串 求有多少个 记忆化搜索 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 -
Palindromes
·
2015-11-09 13:06
USACO sec1.5 Prime
Palindromes
素回文数,打表。。 打表输出 # 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——回文
英语中单词
Palindromes
指顺读倒读都一样的词语,比如radar
·
2015-11-08 16:15
ACM
POJ 3376 Finding
Palindromes
(扩展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
leetcode:Palindrome Number (判断数字是否回文串) 【面试算法题】
Some hints: Could negative integers be
palindromes
?
·
2015-11-08 14:35
LeetCode
uva401 -
Palindromes
结题报告
题目地址 : 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
(Problem 36)Double-base
palindromes
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
[Swust OJ 797]--Palindromic Squares(回文数水题)
problem/797/ Time limit(ms): 1000 Memory limit(kb): 10000 Description
Palindromes
·
2015-11-07 15:20
ROM
【LeetCode】9. Palindrome Number (2 solutions)
Some hints: Could negative integers be
palindromes
? (ie, -1) If you are thinki
·
2015-11-07 11:24
LeetCode
UVa 11584 Partitioning by
Palindromes
【DP】
题意:给出一个字符串,问最少能够划分成多少个回文串 dp[i]表示以第i个字母结束最少能够划分成的回文串的个数 dp[i]=min(dp[i],dp[j]+1)(如果从第j个字母到第i个字母是回文串) 想不明白的还是初始化 初始化为:dp[i]=i+1, 后来= =,发现应该是这样的 从第1个字母到第i个字母最多能够划分成i+1个回文串, 所以为了求最小值,每一个初始
·
2015-11-07 10:56
partition
算法竞赛入门经典(第一版) 第五章 解题报告
算法竞赛入门经典(第一版)第五章解题报告一、字符串题目A-
Palindromes
题意:代码:B-Where'sWaldorf?
gscsdlz
·
2015-11-04 19:00
算法
代码
字符串
ACM
解题报告
Epic -
Palindromes
Print all
palindromes
of size greater than or equal to 3 of a given string.
·
2015-11-02 19:44
ROM
UVA 401
Palindromes
字符串处理。 CODE: #include <iostream> #include <cstdlib> #include <cstdio> #include <ctype.h> #include <cstring> using
·
2015-11-02 18:39
ROM
USACO section 1.5.2 Prime
Palindromes
1. 无数遍TLE的题,快疯了,最后没办法,只能看别人的代码,最好的一个代码,写了下来,但是还有一点地方不太明白,这是一种新的方法, 以下是代码 /* ID: dollar4 PROG: pprime LANG: C++ */ #include <iostream> #include <fstream> #include <string> #includ
·
2015-11-02 18:11
USACO
USACO section 1.2.4 Dual
Palindromes
1. 直接用了上道题的函数,另外,进制转换: string trans(int a) { string str1 = ""; int tmp; while (a) { tmp = a % base; if (tmp < 10) str1 += tmp + '0';
·
2015-11-02 18:07
USACO
Palindrome
Some hints: Could negative integers be
palindromes
?
·
2015-11-02 17:56
ROM
URAL1635——DP+回溯——Mnemonics and
Palindromes
Description The student Vasechkin was terribly unlucky at his oral examination. Of 42 examination questions, he didn't prepare only the last one, and he was asked exactly that question. Vasechkin w
·
2015-11-02 16:02
ROM
UVa 11584 Partitioning by
Palindromes
题意: 给出一个字符串,求最少能划分成多少个回文子串。 分析: d[i] = min{d[j] + 1 | s[j+1]...s[i]是回文串} d[i]表示前 i 个字符最少能分割的回文子串的个数 字符串从s[1]开始,边界d[0] = 0; 预处理:用从中间想两边拓展的方法,用flag[i][j]表示s[j]...s[i]是否是回文串 1 //#defi
·
2015-11-02 15:59
partition
(Problem 36)Double-base
palindromes
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
·
2015-11-02 12:10
double
UVa401 回文词
Palindromes
A regular palindrome is a string of numbers or letters that is the same forward as backward
·
2015-11-02 11:28
uva
UVA 11584 Partitioning by
Palindromes
Partitioning by
Palindromes
Time Limit: 1000ms Memory Limit: 131072KB This problem will be judged
·
2015-11-01 15:08
partition
Prime
Palindromes
一亿以内的质数回文数
Description The number 151 is a prime palindrome because it is both a prime number and a palindrome (it is the same number when read forward as backward). Write a program that finds all prime palin
·
2015-11-01 15:56
Prim
Partitioning by
Palindromes
We say a sequence of characters is a palindrome if it is the same written forwards and backwards. For example, 'racecar' is a palindrome, but 'fastcar' is not. A partition of a se
·
2015-11-01 15:42
partition
leetcode[9]Palindrome Number
Some hints: Could negative integers be
palindromes
? (ie, -1) If you are thinking of converting th
·
2015-10-31 16:07
LeetCode
【leetcode】Palindrome Number
Do this without extra space.Some hints:Could negative integers be
palindromes
?
·
2015-10-31 15:48
LeetCode
hdu 2029
Palindromes
_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
usaco 1.5.2——pprime
Prime
Palindromes
回文质数 描述 因为151即是一个质数又是一个回文数(从左到右和从右到左是看一样的),所以 151 号是回文质数。
·
2015-10-31 11:38
USACO
1.5.2 Prime
Palindromes
/* ID: awsd1231 PROG: pprime LANG: C++ */ #include<iostream> #include<cstdio> using namespace std; int mayAns[] =
·
2015-10-31 11:40
Prim
1.2.5Dual
Palindromes
/* ID: awsd1231 PROG: dualpal LANG: C++ */ #include<iostream> #include<cstdio> #include<cmath> #include<cstring>
·
2015-10-31 11:39
dual
【leetcode】Palindrome Number
Some hints: Could negative integers be
palindromes
?
·
2015-10-31 10:39
LeetCode
经典进制转换——USACO Palindromic Squares
Description
Palindromes
are numbers that read the same forwards as backwards.
·
2015-10-31 10:33
USACO
HDU 2029
Palindromes
_easy version
1 #include<stdio.h> 2 #include<stdlib.h> 3 #include<string.h> 4 int IsPalindromes(char str[]) 5 { 6 int i,len=strlen(str); 7 for(i=0;i<len/2;i++) 8 if(s
·
2015-10-31 10:57
version
401
Palindromes
Palindromes
A regular palindrome is a string of numbers or letters that is the same
·
2015-10-31 09:42
ROM
Careercup - Facebook面试题 - 5177378863054848
2014-05-02 08:29 题目链接 原题: Write a function for retrieving the total number of substring
palindromes
·
2015-10-31 09:21
Facebook
上一页
3
4
5
6
7
8
9
10
下一页
按字母分类:
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
其他