摘要: The zoo have N cats and M dogs, today there are P children visiting the zoo, each child has a like-animal and a dislike-animal, if the child's like-an 阅读全文
posted @ 2017-04-22 21:57 walfy 阅读(107) 评论(0) 推荐(0) 编辑
摘要: 传递闭包最开始是在Floyd-Warshall算法里面出现的,当时这算法用的很少就被我忽视了。。 传递闭包是指如果i能到达k,并且k能到达j,那么i就能到达j Have you ever read any book about treasure exploration? Have you ever 阅读全文
posted @ 2017-04-22 19:58 walfy 阅读(425) 评论(0) 推荐(0) 编辑
摘要: 有向图的最小路径覆盖=V-二分图最大匹配。 Consider a town where all the streets are one-way and each street leads from one intersection to another. It is also known that 阅读全文
posted @ 2017-04-22 19:30 walfy 阅读(798) 评论(0) 推荐(0) 编辑
摘要: 最小定点覆盖是指这样一种情况: 图G的顶点覆盖是一个顶点集合V,使得G中的每一条边都接触V中的至少一个顶点。我们称集合V覆盖了G的边。最小顶点覆盖是用最少的顶点来覆盖所有的边。顶点覆盖数是最小顶点覆盖的大小。 相应地,图G的边覆盖是一个边集合E,使得G中的每一个顶点都接触E中的至少一条边。如果只说覆 阅读全文
posted @ 2017-04-22 18:59 walfy 阅读(2381) 评论(0) 推荐(0) 编辑
摘要: D. Mike and distribution time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Mike has always 阅读全文
posted @ 2017-04-22 17:51 walfy 阅读(320) 评论(0) 推荐(0) 编辑
摘要: C. Mike and gcd problem time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Mike has a seque 阅读全文
posted @ 2017-04-22 13:55 walfy 阅读(167) 评论(0) 推荐(0) 编辑