码迷,mamicode.com
首页 >  
搜索关键字:longest substring wi    ( 8067个结果
测试
Welcome to MarkdownPad 2MarkdownPad is a full-featured Markdown editor for Windows.Built exclusively for MarkdownEnjoy first-class Markdown support wi...
分类:其他好文   时间:2014-05-16 21:05:28    阅读次数:265
lightoj 1427 - Substring Frequency (II) AC自动机
模板题,找来测代码。注意有相同单词//#pragma comment(linker, "/STACK:1024000000,1024000000")#include#include#include#include#include#include#include#include#include#inc...
分类:其他好文   时间:2014-05-16 05:45:11    阅读次数:403
【NEERC 2003】有向图破坏
【题目描述】Alice和Bob正在玩如下的游戏。首先Alice画一个有N个顶点,M条边的有向图。然后Bob试着摧毁它。在一次操作中他可以找到图中的一个点,并且删除它所有的入边或所有的出边。Alice给每个点定义了两个值:Wi+和Wi-。如果Bob删除了第i个点所有的入边他要给Alice付Wi+元,如...
分类:其他好文   时间:2014-05-16 05:00:42    阅读次数:244
最长递增子序列(LIS)求解
问题描述 最长递增子序列也称 “最长上升子序列”,简称LIS ( longest increasing subsequence)。设L=是n个不同的实数的序列,L的递增子序列是这样一个子序列Lis=,其中k1 如:求一个一维数组arr[i]中的最长递增子序列的长度,如在序列{ 7, 1, 6, 5, 3, 4, 8 }中,最长递增子序列长度为4,其递增子序列为:1,3,4,8。...
分类:其他好文   时间:2014-05-15 15:06:59    阅读次数:328
LeetCode-003 Longest Substring Without Repeating Characters
【题目】 Given a string, find the length of the longest substring without repeating characters. For example, the longest substring without repeating letters for "abcabcbb" is "abc", which the length is 3. For "bbbbb" the longest substring is "b", with the len...
分类:其他好文   时间:2014-05-15 14:40:14    阅读次数:320
打印HTML页面部分区域javascript代码
1 function preview(oper) { 2 if (oper "; //设置打印开始区域 5 eprnstr = ""; //设置打印结束区域 6 prnhtml = bdhtml.substring(bdhtm...
分类:编程语言   时间:2014-05-15 14:31:49    阅读次数:485
[LeetCode]Longest Common Prefix
Longest Common Prefix Write a function to find the longest common prefix string amongst an array of strings....
分类:其他好文   时间:2014-05-15 13:27:07    阅读次数:233
回溯法——装载问题
问题描述: 有一批共n个集装箱要装上2艘载重量分别为c1和c2的轮船,其中集装箱i的重量是wi,且不能超,即Σwin时,算法搜索到叶结点,其相应的载重量为cw,如果cw>bestw,则表示当前解优于当前的最优解,此时应该更新bestw。 算法Backtrack动态地生成问题的解空间树。在每个结点.....
分类:其他好文   时间:2014-05-15 10:39:55    阅读次数:412
LeetCode-005 Longest Palindromic Substrin
【题目】 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. 【题意】 题意是找出字符串S中最长回文子串,S最长为1000,保证有唯一解 【思路】 原字符串用特殊字符#间隔,如下所示: #a...
分类:其他好文   时间:2014-05-15 03:31:25    阅读次数:299
leetcode题目:Palindrome Partitioning 和Palindrome Partitioning II
题目一: Given a string s, partition s such that every substring of the partition is a palindrome. Return all possible palindrome partitioning of s. For example, given s = "aab", Return [ ...
分类:其他好文   时间:2014-05-14 15:10:01    阅读次数:293
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!