码迷,mamicode.com
首页 >  
搜索关键字:palindromes    ( 345个结果
uva 401.Palindromes
题目链接:https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=342 题目意思:给出一段字符串(大写字母+数字组成)。判断是否为回文串 or 镜像串 or 回文 ...
分类:其他好文   时间:2016-04-02 22:55:46    阅读次数:294
Codeforces Round #316 (Div. 2)E. Pig and Palindromes DP
E. Pig and Palindromes E. Pig and Palindromes Peppa the Pig was walking and walked into the forest. What a strange coincidence! The forest has the sha ...
分类:其他好文   时间:2016-04-01 23:19:05    阅读次数:325
Palindrome Number ---- LeetCode 009
Determine whether an integer is a palindrome. Do this without extra space. Some hints: Could negative integers be palindromes? (ie, -1) If you are thi ...
分类:其他好文   时间:2016-03-31 14:23:43    阅读次数:125
UVA 401 - Palindromes
题意:输入字符串,判断回文和镜像 分析:打表,比对,标志变量判断 注释:水题,注意细节,注意输出格式!!!!!!!!!!!!!!! ...
分类:其他好文   时间:2016-03-29 12:31:07    阅读次数:99
【HDOJ】3948 The Number of Palindromes
后缀数组求不重复回文子串数目。注意dp数组。 1 /* 3948 */ 2 #include <iostream> 3 #include <sstream> 4 #include <string> 5 #include <map> 6 #include <queue> 7 #include <set
分类:其他好文   时间:2016-02-04 01:09:17    阅读次数:285
LightOJ1033 Generating Palindromes(区间DP/LCS)
题目要计算一个字符串最少添加几个字符使其成为回文串。一年多前,我LCS这道经典DP例题看得还一知半解时遇到一样的问题,http://acm.fafu.edu.cn/problem.php?id=1007。当时完全靠自己瞎YY出了LCS的解法:我当时这么想的:把字符串分成两个部分,假设这两个部分分别就...
分类:其他好文   时间:2016-01-13 21:27:30    阅读次数:134
hoj 1004 Prime Palindromes(还是不够完美)
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...
分类:其他好文   时间:2015-12-26 14:50:19    阅读次数:198
[APIO2014] [Uoj103] [Bzoj3676] Palindromes回文串 [Manacher,后缀数组]
用Manacher算法枚举回文子串,每次在后缀数组排序后的后缀数组中二分,因为用某一后缀和其他子串分别求匹配的长度,匹配长度在排序后该后缀的两侧具有单调性(匹配长度为min{H[x]|i#include #include #include #include #include #include usi...
分类:编程语言   时间:2015-11-20 19:49:13    阅读次数:278
uva 11584 Partitioning by Palindromes(dp)
题目链接题意:给定一个字符串,分解成多个子串,每个子串都是回文串,问最少能分成多少个子串。题解:dp[i]表示前i个字符串分割成最少回文子串的数量;0using namespace std;int dp[1005];string s;bool ok(int j,int i){ while(j>...
分类:其他好文   时间:2015-11-16 22:30:08    阅读次数:180
HDU 5340 Three Palindromes(Manacher)
Problem Description:Can we divided a given string S into three nonempty palindromes?Input:First line contains a single integerT≤20which denotes the nu...
分类:其他好文   时间:2015-11-12 17:32:00    阅读次数:253
345条   上一页 1 ... 14 15 16 17 18 ... 35 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!