[BZOJ1322]Destroying The Graph】的更多相关文章

题目大意:有一张有向图,对于每个点,有两种操作:1. 删掉它的所有入边2. 删掉它的所有出边对每个点的每个操作均有不同的价值.求使得图上没有边的最小价值.解题思路:考虑把点拆成入点和出点,然后就是二分图最小点权覆盖集.也可以考虑最小割.从S到每个点的入点连容量为该点执行操作2的价值,每个点的出点到T连容量为该点执行操作1的价值.对于图上的每条边连容量inf的边.然后答案就是最小割(割一条S出发的边,相当于执行了2操作,网络流不可能从该点再流向其他节点,则相当于删掉出边.操作1同理). C++ C…
Destroying The Graph Time Limit: 2000MS   Memory Limit: 65536K Total Submissions: 8198   Accepted: 2635   Special Judge Description Alice and Bob play the following game. First, Alice draws some directed graph with N vertices and M arcs. After that B…
                                                      Destroying The Graph Time Limit: 2000MS   Memory Limit: 65536K Total Submissions: 8158   Accepted: 2620   Special Judge Description Alice and Bob play the following game. First, Alice draws some d…
网络流/二分图最小点权覆盖 果然还是应该先看下胡伯涛的论文…… orz proverbs 题意: N个点M条边的有向图,给出如下两种操作.删除点i的所有出边,代价是Ai.删除点j的所有入边,代价是Bj.求最后删除图中所有的边的最小代价. 其实就是二分图最小点权覆盖. 定义:从x或者y集合中选取一些点,使这些点覆盖所有的边,并且选出来的点的权值尽可能小. 题解: 拆点.n个点拆成2n个点(左右各n个,i与(i+n)对应,之间连容量INF的边),S和i连容量为Ai的边,(i+n)与T之间连容量为Bi…
Destroying The Graph   Description Alice and Bob play the following game. First, Alice draws some directed graph with N vertices and M arcs. After that Bob tries to destroy it. In a move he may take any vertex of the graph and remove either all arcs…
Destroying The Graph Time Limit: 2000MS   Memory Limit: 65536K Total Submissions: 8311   Accepted: 2677   Special Judge Description Alice and Bob play the following game. First, Alice draws some directed graph with N vertices and M arcs. After that B…
Destroying The Graph http://poj.org/problem?id=2125 Time Limit: 2000MS   Memory Limit: 65536K           Description Alice and Bob play the following game. First, Alice draws some directed graph with N vertices and M arcs. After that Bob tries to dest…
Destroying The Graph Time Limit: 2000MS   Memory Limit: 65536K Total Submissions: 8356   Accepted: 2696   Special Judge Description Alice and Bob play the following game. First, Alice draws some directed graph with N vertices and M arcs. After that B…
Destroying The Graph 构图思路: 1.将所有顶点v拆成两个点, v1,v2 2.源点S与v1连边,容量为 W- 3.v2与汇点连边,容量为 W+ 4.对图中原边( a, b ), 连边 (a1,b2),容量为正无穷大 则该图的最小割(最大流)即为最小花费. 简单证明: 根据ST割集的定义,将顶点分成两个点集.所以对于原图中的边(a,b),转换成 S->a1->b2->T. 则此时路径必定存在 一条割边,因为a1->b2为无穷大,所以割边必定是 S->a1…
题意: 给你一张有向图,你可以选择一个点:• 摧毁其所有的入边,代价A[i].• 摧毁其所有的出边,代价B[i].• 求摧毁这张图的最小代价.• 数据范围1000 /* 很经典的一道题目(我这么弱,稍微一变形就不会了) 因为每个点涉及到出边和入边,所以可以考虑拆点,然后建图,接下来就成了一个最小点权覆盖的问题. 最小点权覆盖就是求最小割(证明可参考胡伯涛论文"最小割模型在信息学竞赛中的应用"). 接下来是输出方案,因为我们要选择的点与S或T连得边是满流的,所以可以dfs一边,只走不满流…