

个人整理 ACM 模板.docx
快乐****蜜蜂
亲,该文档总共71页,到这已经超出免费预览范围,如果喜欢就直接下载吧~
相关资料
个人整理 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个人模板 by hnust_xiehonghao.doc
ByHnust_xiehonghao未经本人同意请不要随意传播可个人使用1HYPERLINK"http://blog.csdn.net/hnust_xiehonghao/article/details/7869124"快速幂求余模板2中国剩余定理模板3:欧拉函数4:log的用法5:已知半径以及圆上2点求圆心6打印素数表71到num中的所有数与m个质因子不互质的个数可以用来求a到b的数中与n互质的数的个数8大数9求一个很大的数的质因子10单调递增或递减最长子序列复杂度O(n^2)11最长公共子序列:输
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模板.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