摘要: 推荐博客:http://hzwer.com/8053.html 分块入门题库:https://loj.ac/problems/search?keyword=%E5%88%86%E5%9D%97 分块1:给出一个长为n的数列,以及n个操作,操作涉及区间加法,单点查值。 1 #include<cstdi 阅读全文
posted @ 2018-04-18 22:23 HDU_jackyan 阅读(1219) 评论(0) 推荐(1) 编辑
摘要: 推荐几篇文章:https://blog.csdn.net/strangedbly/article/details/51137432(SG函数详细介绍) https://blog.csdn.net/shahdza/article/details/7832997 博弈题集 SG函数解题模型: 1.把原游 阅读全文
posted @ 2018-04-16 21:46 HDU_jackyan 阅读(603) 评论(0) 推荐(0) 编辑
摘要: 桥和割点例题+讲解:hihocoder1183 http://hihocoder.com/problemset/problem/1183 1 #include<cstdio> 2 #include<cstring> 3 #include<algorithm> 4 #include<vector> 5 阅读全文
posted @ 2018-04-13 18:46 HDU_jackyan 阅读(217) 评论(0) 推荐(0) 编辑
摘要: tarjan模板 1 #include<cstdio> 2 #include<cstring> 3 #include<algorithm> 4 using namespace std; 5 const int maxn=20010; 6 const int maxm=50010; 7 struct 阅读全文
posted @ 2018-04-09 21:41 HDU_jackyan 阅读(1141) 评论(0) 推荐(0) 编辑
摘要: 推荐几个博客:https://blog.csdn.net/int64ago/article/details/7429868搞懂树状数组 https://blog.csdn.net/z309241990/article/details/9615259区间修改 https://blog.csdn.net 阅读全文
posted @ 2018-04-04 15:50 HDU_jackyan 阅读(249) 评论(0) 推荐(0) 编辑
摘要: 单点更新模板(以区间求和为例) 1 #include<cstdio> 2 #include<cstring> 3 #include<algorithm> 4 using namespace std; 5 #define lson l,m,rt*2 6 #define rson m+1,r,rt*2+ 阅读全文
posted @ 2018-03-30 14:05 HDU_jackyan 阅读(299) 评论(0) 推荐(0) 编辑
摘要: 首先明确一点:知二求一的前提条件是已知的两种遍历必须要存在中序遍历,因为先序遍历和后序遍历是负责找到根节点的而分不清左右子树交界的地方。 根据后序遍历和中序遍历输出先序遍历 采用递归的写法,每次“二分”(不断分成左边和右边两部分),通过后序遍历的最后一个值确定当前的根节点,然后根据根节点在在中序遍历 阅读全文
posted @ 2018-03-27 22:07 HDU_jackyan 阅读(357) 评论(0) 推荐(0) 编辑
摘要: 最大流的各种变体与技巧: 1.存在多个源点和汇点,设置超级源点和超级汇点,使得超级源点连向各个源点,各个汇点连向超级汇点,边的容量都是INF 2.顶点也有限制的情况(即有点权),考虑拆点,将顶点拆成两个点,中间连一条容量为点权的边 3.若点与点之间的边为无向边,则各自方向建一条边(各自的容量都等于无 阅读全文
posted @ 2018-03-24 20:43 HDU_jackyan 阅读(213) 评论(0) 推荐(0) 编辑
摘要: 【HDU】1532 Drainage Ditches(入门) [最大流] 3549 Flow Problem(入门) [最大流] 3572 Task Schedule(基础) [最大流]任务分配,判断满流 2732 Leapin' Lizards(较难) [最大流] 3338 Kakuro Exte 阅读全文
posted @ 2018-03-23 13:55 HDU_jackyan 阅读(238) 评论(0) 推荐(0) 编辑
摘要: 基于BellmanFord求最短路的最小费用流模板 1 #include<cstdio> 2 #include<cstring> 3 #include<algorithm> 4 #include<queue> 5 #include<vector> 6 using namespace std; 7 c 阅读全文
posted @ 2018-03-19 21:58 HDU_jackyan 阅读(421) 评论(0) 推荐(0) 编辑