码迷,mamicode.com
首页 >  
搜索关键字:hdu1711    ( 25个结果
hdu 1711 Number Sequence KMP模板题~~~
Problem Description Given two sequences of numbers : a[1], a[2], ...... , a[N], and b[1], b[2], ...... , b[M] (1 <= M <= 10000, 1 <= N <= 1000000). Your task is to find a number K which make a[K] = b[1], a[K + 1] = b[2], ...... , a[K + M - 1] = b[M]. If th...
分类:其他好文   时间:2015-04-03 11:27:27    阅读次数:128
HDU1711_Number Sequence__kmp
水题 1 #include 2 #include 3 const int maxn=1e6+5; 4 const int maxm=1e4+5; 5 int p[maxm]; 6 int t[maxn]; 7 int f[maxm]; 8 int n,m; 9 void getfail()10 {1...
分类:其他好文   时间:2015-03-01 17:01:46    阅读次数:166
poj3211Washing Clothes(字符串处理+01背包) hdu1171Big Event in HDU(01背包)
题目链接: poj3211  hdu1171 这个题目比1711难处理的是字符串如何处理,所以我们要想办法,自然而然就要想到用结构体存储,所以最后将所有的衣服分组,然后将每组时间减半,看最多能装多少,最后求最大值,那么就很愉快的转化成了一个01背包问题了。。。。 hdu1711是说两个得到的价值要尽可能的相等,所以还是把所有的价值分为两半,最后01背包,那么这个问题就得到了解决。。 ...
分类:其他好文   时间:2014-08-10 15:41:40    阅读次数:298
HDU1711 【kmp算法 基础题】
#include#includeint next[10005],lena,lenb;int a[1000005],b[10005];void set_naxt()//子串的next数组{ int i=0,j=-1; next[0]=-1; while(i<lenb) { ...
分类:其他好文   时间:2014-08-07 18:26:50    阅读次数:227
HDU1711 最基础的kmp算法
Problem DescriptionGiven two sequences of numbers : a[1], a[2], ...... , a[N], and b[1], b[2], ...... , b[M] (1 2 #include 3 using namespace std; 4 .....
分类:其他好文   时间:2014-07-23 12:27:06    阅读次数:252
25条   上一页 1 2 3
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!