![](https://img-blog.csdnimg.cn/20201014180756757.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
模版
文章平均质量分 67
bin_gege
这个作者很懒,什么都没留下…
展开
-
hdu_3068_最长回文(Manacher)
题目连接:http://acm.hdu.edu.cn/showproblem.php?pid=3068 题意:给你一个字符串,让你求最长的回文子串。 题解:数据量比较大,暴力O(n2)会超时,直接上马拉车,模版题。#include #include #define min(a,b) (a)>(b)?(b):(a) #define max(a,b) (a)>(b)?(a):(b) const i原创 2016-05-07 16:44:41 · 308 阅读 · 0 评论 -
hdu_3062_Party(2-SAT)
题目连接:http://acm.hdu.edu.cn/showproblem.php?pid=3062/ 题意:2-SAT的裸题 题解:直接上模版 #include #include const int MAXN = 2020; const int MAXM = 1000010; struct Edge { int to, next; }edge[MAXM]; int head[MAXN原创 2016-05-08 23:06:19 · 315 阅读 · 0 评论 -
hdu_3549_Flow Problem(最大流)
题目连接:http://acm.hdu.edu.cn/showproblem.php?pid=3549 题意:求1到n的最大流 题解:模版题,直接上Claris的ISAP,效率是一般dfs的十倍,ORZ Claris!!! #include #include #define F(i,a,b) for(int i=a;i<=b;i++) using namespace std; const i原创 2016-06-30 20:19:28 · 318 阅读 · 0 评论 -
hdu_2544_最短路(spfa版子)
题目连接:hdu_2544_最短路 存个自己写的SPFA的板子 #include #include #define mst(a,b) memset(a,b,sizeof(a)) #define F(i,a,b) for(int i=a;i<=b;i++) const int N=10011,inf=1<<30; int g[N],v[N*2],nxt[N*2],w[N*2],ed,d[N],原创 2016-07-15 16:08:48 · 283 阅读 · 0 评论 -
hdu_2255_奔小康赚大钱(KM带权二分匹配板子)
题目连接:hdu_2255_奔小康赚大钱 存个板子 /* 其实在求最大 最小的时候只要用一个模板就行了, 把边的权值去相反数即可得到另外一个.求结果的时候再去 相反数即可,最大最小有一些地方不同。。 */ #include #include #include #include const int N = 301; const int INF = (1<<30)-1; int w[N][N];原创 2016-07-15 20:49:52 · 241 阅读 · 0 评论 -
hdu_2222_Keywords Search(AC自动机板子)
题目连接:hdu_2222_Keywords Search 存个自己写的AC自动机 #include #include #define F(i,a,b) for(int i=a;i<=b;i++) const int AC_N=10001*50,tyn=26;//数量乘串长,类型数量 struct AC_automation{ int tr[AC_N][tyn],cnt[AC_N],原创 2016-07-17 18:18:33 · 287 阅读 · 0 评论 -
完全大数(高精度)模版
#include #include #include #include using namespace std; /* * 完全大数模板 * 输入cin>>a * 输出a.print(); * 注意这个输入不能自动去掉前导0的,可以先读入到char数组,去掉前导0,再用构造函数。 */ #define MAXN 9999 #define MAXSIZE 1010 //输转载 2016-04-29 20:34:34 · 382 阅读 · 0 评论