hdu 3072 Intelligence System
摘要:
http://acm.hdu.edu.cn/showproblem.php?pid=3072题意:在一个有向图中,有多个连通分量,每个连通 分量都会有一个根节点,求当满足每个根节点都可以到其它根节点时的最小权值。环中的间的权值都为0.思路:因为有环,而已环中的权值为0,所以要进行缩点,缩点后重建图,所得到的图将没有环。然后枚举每个根节点,进行记忆化搜索就好了。View Code #include<stdio.h>#include<string.h>#include<iostream>#include<stack>#include<utili 阅读全文
posted @ 2012-06-19 21:30 aigoruan 阅读(171) 评论(0) 推荐(0)