ACM模板.pdf
as****16
亲,该文档总共199页,到这已经超出免费预览范围,如果喜欢就直接下载吧~
相关资料
ACM模板.pdf
第一章数据结构1、splaystructnode{intsize;node*c[2],*p;};nodea[N],*root,*nullNode;intcnt;voidpushUp(node*p){if(p==nullNode)return;p->size=1+p->c[0]->size+p->c[1]->size;}voidpushDown(node*p){if(p==nullNode)return;}node*newNode(intval,node*p){node*e=&a[cnt++];e->c[0
邝斌的ACM模板.docx
TOC\o"1-2"\h\z\uHYPERLINK\l"_bookmark0"字符串处理2HYPERLINK\l"_bookmark1"1、KMP算法2HYPERLINK\l"_bookmark2"2、扩展KMP5HYPERLINK\l"_bookmark3"3、Manacher最长回文子串6HYPERLINK\l"_bookmark4"4、AC自动机7HYPERLINK\l"_bookmark5"5、后缀数组9HYPERLINK\l"_bookmark6"6、
个人整理 ACM 模板.docx
头文件#define_CRT_SBCURE_NO_DEPRECATE#include<set>#include<cmath>#include<queue>#include<stack>#include<vector>#include<string>#include<cstdio>#include<cstdlib>#include<cstring>#include<iostream>#include<algorithm>#include<functional>usingnamespacestd;consti
浙江大学ACM模板.doc
ZhejiangUniversityICPCTeamRoutineLibrarybyWishingBone(Dec.2002)LastUpdate(Nov.2004)byRiveriaTOC\o"1-3"\h\zHYPERLINK\l"_Toc87858530"1、几何PAGEREF_Toc87858530\h25HYPERLINK\l"_Toc87858531"1.1注意PAGEREF_Toc87858531\h25HYPERLINK\l"_Toc878
字符串ACM模板.doc
<字符串>KMP#include<iostream>usingnamespacestd;chart[10010],s[1000100];intkmpNext[10010];/*standardCcodeforKMP*/voidpreKmp(char*x,intm,intkmpNext[]){inti,j;i=0;j=kmpNext[0]=-1;while(i<m){while(j>-1&&x[i]!=x[j]){j=kmpNext[j];}i++;j++;if(x[i]==x[j]){kmpNext[i]