1001. Vertex Cover 题意:有一个贪心算法求最小顶点覆盖是每次选出度数最大的点然后删去,输出一个图使得这个算法跑出来的答案是你给出的答案的三倍及以上。 题解: 构造一个二分图,设左边有 nn 个点,标号是 1 ~ n1 n。对于每个 i \in [1, n]i∈[1,n],都在右边新 ...
分类:
其他好文 时间:
2017-08-20 10:24:57
阅读次数:
212
原贴链接:http://blog.csdn.net/flynn_curry/article/details/52966283 仅仅用于自己理解,若有共鸣,别太吐槽就行哈~ 首先是匈牙利算法的本质:(图参考了zxy的) 这个图要详细看完,那么刚开始我想的“找小三”实际上就是递归找增广路的过程,如果找到 ...
分类:
其他好文 时间:
2017-08-13 18:07:44
阅读次数:
150
Bessie wants to navigate her spaceship through a dangerous asteroid field in the shape of an N x N grid (1 <= N <= 500). The grid contains K asteroids ...
分类:
其他好文 时间:
2017-08-13 14:17:01
阅读次数:
247
Give you a matrix(only contains 0 or 1),every time you can select a row or a column and delete all the '1' in this row or this column . Your task is t ...
分类:
其他好文 时间:
2017-08-13 10:08:15
阅读次数:
139
As we all know, machine scheduling is a very classical problem in computer science and has been studied for a very long history. Scheduling problems d ...
分类:
系统相关 时间:
2017-08-13 09:58:35
阅读次数:
251
Asteroids Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 22905 Accepted: 12421 Description Bessie wants to navigate her spaceship through ...
分类:
其他好文 时间:
2017-07-23 18:25:06
阅读次数:
271
题目: 证明: 很容易将最小顶点覆盖归约到HITTING SET。假设要求图G的最小顶点覆盖,可以建立一个 HITTING SET 实例,其中 S1 , S2 , S3,...,Sn 即是图G的各条边,比如{v1,v2},{v3,v4},... 。通过二分式的询问,可以找到一个与 Si都相交的最小集 ...
分类:
编程语言 时间:
2017-07-06 00:25:16
阅读次数:
155
传递闭包最开始是在Floyd-Warshall算法里面出现的,当时这算法用的很少就被我忽视了。。 传递闭包是指如果i能到达k,并且k能到达j,那么i就能到达j Have you ever read any book about treasure exploration? Have you ever ...
分类:
其他好文 时间:
2017-04-22 20:45:08
阅读次数:
254
最小定点覆盖是指这样一种情况: 图G的顶点覆盖是一个顶点集合V,使得G中的每一条边都接触V中的至少一个顶点。我们称集合V覆盖了G的边。最小顶点覆盖是用最少的顶点来覆盖所有的边。顶点覆盖数是最小顶点覆盖的大小。 相应地,图G的边覆盖是一个边集合E,使得G中的每一个顶点都接触E中的至少一条边。如果只说覆 ...
分类:
其他好文 时间:
2017-04-22 19:48:45
阅读次数:
234
Description Bessie wants to navigate her spaceship through a dangerous asteroid field in the shape of an N x N grid (1 <= N <= 500). The grid contains ...
分类:
其他好文 时间:
2017-03-11 18:54:13
阅读次数:
230