

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
<数据结构>闭散列法整数hash#definemax4000037inthash[max],c[max];//hash存关键字,c存该位置关键字出现的次数booluse[max];intn,m,ans;intk[6],p[6];intlocate(intk)//hash函数{inttmp;tmp=k;while(tmp<0)tmp+=max;while(tmp>=max)tmp-=max;while(use[tmp]&&hash[tmp]!=k){tmp++;if(tmp>=max)tmp-=max;}r
浙江大学ACM模板.docx
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"_Toc87858532"1.2