摘要: Tarjan缩点后求入度为0的点,即是要求最少电话。#include #include #include #include using namespace std;int cst[1010];struct Edge{ int u,v; int next;}edge[2010];int head[10... 阅读全文
posted @ 2014-12-01 16:51 chenjunjie1994 阅读(152) 评论(0) 推荐(0) 编辑
摘要: 很水的TARJAN求强联通图的问题。#include #include #include #include using namespace std;const int N=10010;const int M=100010;int head[N],dfn[N],low[N],stack[N],st;s... 阅读全文
posted @ 2014-12-01 16:07 chenjunjie1994 阅读(112) 评论(0) 推荐(0) 编辑