- 博客(5)
- 资源 (3)
- 收藏
- 关注
原创 敌兵布阵
线段树:#include #include int a[1000000],n; int sum(int x,int y) { return x+y; } void build(int l,int r,int rt) { if(l == r) { scanf("%d",&a[rt]); return ; } int m = (l + r) >> 1; build(l,m,rt
2015-07-31 15:55:10 321
原创 HDU 1841: Find the Shortest Common Superstring
!!!#include #include #include using namespace std; char a[2000005],b[2000005]; int nextd[2000010]; void get(char *ch) { int l = strlen(ch); int s = 0,t = -1; nextd[0] = -1; while(s <l) { if(t
2015-07-30 15:52:38 539
原创 HDU 1867:A + B for you again
#include #include #include using namespace std; char a[100001],b[100001]; int nextd[100001]; void get(char *ch) { int s=0,t=-1; nextd[0]=-1; int l=strlen(ch); while(s<l) { if(t==-1||ch[s]==ch[
2015-07-30 15:47:20 489
原创 KMP算法小结
KMP算法: 1.理解NEXT数组的意义。 2.理解模式匹配的过程。 3.理解回退的原理(从上一次匹配成功的字符串开始继续匹配) #include #include int next[100000]; char ch1[10000], ch2[1000]; void getnext() { int len2 = strlen(ch2 + 1); next[1]
2015-07-28 16:14:04 373
原创 母函数小总结
核心: 1.“把组合问题的加法法则和幂级数的乘幂对应起来” 2.“母函数的思想很简单 — 就是把离散数列和幂级数一 一对应起来,把离散数列间的相互结合关系对应成为幂级数间的运算关系,最后由幂级数形式来确定离散数列的构造. “(以后就会懂了) 核心代码: #include using namespace std; const int _max = 10001;
2015-07-24 10:12:28 314
MyEclipse 2015 Stable 2.0破解
2015-10-25
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人