码迷,mamicode.com
首页 >  
搜索关键字:palindromic substrin    ( 620个结果
ZOJ - 3816 Generalized Palindromic Number
Description A number that will be the same when it is written forwards or backwards is known as a palindromic number. For example, 1234321 is a palindromic number. We call a number generalized p...
分类:其他好文   时间:2014-09-07 22:31:15    阅读次数:241
zoj 3816 Generalized Palindromic Number (二分+贪心)
题目连接 :http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=5348牡丹江网络赛的题,比赛的时候想到做法的,但是一直没调出来,赛后也调了些时间,最近代码能力堪忧啊~有好多做法, 我的做法是二分下界low,即判断在low到n-1之间...
分类:其他好文   时间:2014-09-07 21:07:25    阅读次数:270
ZOJ 3816 Generalized Palindromic Number dfs+暴力枚举
题目链接:点击打开链接 题意: 给定一个数n 找一个最大的数u使得u 枚举前面有多少位是一样的。然后分类讨论。啪啦啪啦 #include #include #include #include #include using namespace std; typedef long long ll; const int N = 22; int pie[N], piesize; ll ...
分类:其他好文   时间:2014-09-07 19:52:35    阅读次数:252
Mudangjiang Online H Generalized Palindromic Number
一开始觉得是数位DP,后来想不出来。 但是感觉爆搜+剪枝可以过,于是就过了。。#include #include #include using namespace std;typedef long long LL;const int maxn = 50;int lim[maxn], len;LL n...
分类:其他好文   时间:2014-09-07 18:32:55    阅读次数:177
[LeetCode] Longest Palindromic Substring
Given a string S, find the longest palindromic substring in S. You may assume that the maximum length of S is 1000, and there exists one unique longes...
分类:其他好文   时间:2014-08-26 19:09:06    阅读次数:153
projecteuler---->problem=36----Double-base palindromes
Problem 36 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...
分类:其他好文   时间:2014-08-25 10:06:04    阅读次数:198
【Leet Code】Longest Palindromic Substring ——传说中的Manacher算法
Longest Palindromic Substring  Total Accepted: 17474 Total Submissions: 84472My Submissions Given a string S, find the longest palindromic substring in S. You may assume that the maximum l...
分类:其他好文   时间:2014-08-24 16:46:02    阅读次数:190
Longest Palindromic Substring
Given a stringS, find the longest palindromic substring inS. You may assume that the maximum length ofSis 1000, and there exists one unique longest pa...
分类:其他好文   时间:2014-08-23 21:35:21    阅读次数:264
LeetCode "Longest Palindromic Substring" - 1D DP
2D DP is an intuitive solution of course, but I got an MLE error, so I simplified it into a 1D DP:class Solution {public: void goDp(vector &dp, int...
分类:其他好文   时间:2014-08-06 06:14:40    阅读次数:196
LeetCode第五题,Longest Palindromic Substring
题目原文: Given a string S, find the longest palindromic substring in S. You may assume that the maximum length of S is 1000, and there exists one unique longest palindromic substring. 题意解析: 最长回文子串。就是...
分类:其他好文   时间:2014-08-05 15:56:59    阅读次数:290
620条   上一页 1 ... 57 58 59 60 61 62 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!