
模板
文章平均质量分 83
Infertom
这个作者很懒,什么都没留下…
展开
-
manacher模板
参数:原串返回值:最长回文串长度附:同时记录每一位的最长回文串长度————————————————————————————————————————————const int MAXN = 110000 ;char strOri[MAXN+100];int maxPalindrome[MAXN*2+100];//最长回文//manacher,返回最长的回文原创 2015-01-14 14:40:40 · 321 阅读 · 0 评论 -
KMP模板
参数:原串和模式串返回值:在原串中模式串的个数可选:单个字符是否可以被重复使用于多个匹配中————————————————————————————————————————————————————————————const int MAXN = 100000 ; char strOri[MAXN+100], strPar[MAXN+100];int nextLink[原创 2015-01-14 14:18:51 · 717 阅读 · 0 评论 -
组合数取模计算模板
1一般组合数计算mod的要求:无有效范围:1————————————————————————————————//一般方法求C(n,m)最后取模。C(62,28)溢出。有效范围1<n,m<=60ll CNormal(int n, int m){ if ( m>n ) return 0; ll ans = 1; for (int i=1; i<=m; i++) { an原创 2015-02-04 14:22:53 · 815 阅读 · 0 评论