摘要: 题目链接:http://acm.nyist.net/JudgeOnline/problem.php?pid=120也就是求添加多少条边可以构成强连通,有向图。方法是有trajan之后缩点,看新构成的图出度或者入度为零,大的即为要加的边。有主意图本身就连通是这是加的变为0,而不是1.View Code 1 #include <iostream> 2 #include <cstring> 3 #include <cstdio> 4 #include <stack> 5 using namespace std; 6 const int MAX=105; 阅读全文
posted @ 2012-04-26 17:38 我们一直在努力 阅读(152) 评论(0) 推荐(0) 编辑