摘要: 题目连接:http://acm.hdu.edu.cn/showproblem.php?pid=3549 题意:求1到n的最大流 题解:模版题,直接上Claris的ISAP,效率是一般dfs的十倍,ORZ Claris!!! 1 #include<cstdio> 2 #include<algorith 阅读全文
posted @ 2016-06-30 20:19 bin_gege 阅读(111) 评论(0) 推荐(0) 编辑
摘要: 题目连接:http://acm.hdu.edu.cn/showproblem.php?pid=4718 题意:给你一棵树,每个节点有一个值,然后任给树上的两点,问这两点的最长连续递增区间是多少 题解:先树链剖分,然后结合线段树的区间合并来搞,注意的是要记录递增和递减两个状态,因为线段树的区间都是从根 阅读全文
posted @ 2016-06-30 17:31 bin_gege 阅读(231) 评论(0) 推荐(0) 编辑
摘要: 题目连接:http://acm.hdu.edu.cn/showproblem.php?pid=1950 题意:实际就是求最长递增子序列 题解:有两种解法,一种是利用二分,一种是用线段树 这个是这题的二分代码: 1 #include <cstdio> 2 #include<algorithm> 3 # 阅读全文
posted @ 2016-06-30 12:02 bin_gege 阅读(112) 评论(0) 推荐(0) 编辑
摘要: 题目连接:http://acm.hdu.edu.cn/showproblem.php?pid=4521 题意:中文题,不解释 题解:这题就是LIS的加强版,可以用二分的nlogn来做,也可以用线段树的nlogn 做这个带间隔的LIS,具体看代码 1 #include<stdio.h> 2 #incl 阅读全文
posted @ 2016-06-30 11:16 bin_gege 阅读(160) 评论(0) 推荐(0) 编辑