上一页 1 ··· 6 7 8 9 10 11 12 13 14 ··· 47 下一页

2014年8月29日

摘要: http://acm.hdu.edu.cn/showproblem.php?pid=4396题意:在至少走k条边的前提下求最短路思路:在原有最短路模板的基础上多加一维,dis[i][j]表示走到i点经过j条边的最短路,没有别的变化#include #include #include #include... 阅读全文
posted @ 2014-08-29 14:27 LegendaryAC 阅读(333) 评论(0) 推荐(0) 编辑

2014年8月26日

摘要: 转http://www.cnblogs.com/zibuyu/archive/2013/03/14/2960399.html欧拉通路 欧拉回路的区别 及其判定在做一些图类时经常要用到欧拉路,比如近期的单词连接和涂彩棒等,下面整理了一点:欧拉通路: 通过图中每条边且只通过一次,并且经过每一顶点的通路。... 阅读全文
posted @ 2014-08-26 23:39 LegendaryAC 阅读(337) 评论(0) 推荐(0) 编辑
 
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=1116判断有向图欧拉回路和欧拉通路有向图:欧拉回路:图联通,所有顶点出度等于入度(通过图中每条边且只通过一次,并且经过每一顶点的回路。)欧拉通路:图联通,除起点终点所有顶点出度等于入度,起点的出度-入度=1,终点的... 阅读全文
posted @ 2014-08-26 23:38 LegendaryAC 阅读(253) 评论(0) 推荐(0) 编辑

2014年8月20日

摘要: http://acm.hdu.edu.cn/showproblem.php?pid=4970比赛的时候线段树水过的,比赛后线段树一直T,看了下正解真的是智商压制题意:走直线,长度1-N,还有一些人,起点任意,每个人有血量,m个塔,每个塔有攻击范围和伤害,在一个点只会受到塔一次攻击,走到N存活,问存活... 阅读全文
posted @ 2014-08-20 23:28 LegendaryAC 阅读(349) 评论(0) 推荐(0) 编辑

2014年8月18日

摘要: http://acm.hdu.edu.cn/showproblem.php?pid=4557解决一类问题的set用法#include #include #include #include #include #include using namespace std ;char na[1005][20]... 阅读全文
posted @ 2014-08-18 10:12 LegendaryAC 阅读(226) 评论(0) 推荐(0) 编辑
 
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=4864#include #include #include #include #include #include #include using namespace std ;typedef __int64 ll ;... 阅读全文
posted @ 2014-08-18 09:48 LegendaryAC 阅读(179) 评论(0) 推荐(0) 编辑

2014年8月13日

摘要: http://acm.hdu.edu.cn/showproblem.php?pid=1565先进行二分图黑白染色,S到黑,白到T,黑到白,问题转化成了求最大权独立集,最大点权独立集=sum-最小点权覆盖集,最小点权覆盖集等于上图最小割具体解释:二分图最小点覆盖和最大独立集都可以转化为最大匹配求解。在... 阅读全文
posted @ 2014-08-13 17:48 LegendaryAC 阅读(174) 评论(0) 推荐(0) 编辑
 
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=3046典型的最小割模型#include #include #include using namespace std ;const int INF=0xfffffff ;struct node{ int s,... 阅读全文
posted @ 2014-08-13 12:40 LegendaryAC 阅读(153) 评论(0) 推荐(0) 编辑

2014年8月12日

摘要: http://acm.hdu.edu.cn/showproblem.php?pid=4240题意:求最大流和流量最大的一条路径的流量的比值题解:流量最大的路径的流量在dinic的dfs每次搜到终点的时候更新最大值#include #include #include #include #include... 阅读全文
posted @ 2014-08-12 00:44 LegendaryAC 阅读(214) 评论(0) 推荐(0) 编辑

2014年8月11日

摘要: http://acm.hdu.edu.cn/showproblem.php?pid=3546题意:10个寄存器初值为1,有加乘赋值运算,最多30w次运算,大数最多5000位,问最后10个寄存器的结果题解:想直接暴力,但是会超时,30w*5000略多,关键优化是注意到如果出现赋值运算,则被赋值的寄存器... 阅读全文
posted @ 2014-08-11 04:45 LegendaryAC 阅读(236) 评论(0) 推荐(0) 编辑
上一页 1 ··· 6 7 8 9 10 11 12 13 14 ··· 47 下一页