摘要: "题目" 缩完点后统计入读为零的点就可以来。 因为缩完点后肯定是DAG cpp include include include using namespace std; int dfn[100100],low[100010],tim; bool instack[100010]; int stack[ 阅读全文
posted @ 2018-03-12 20:43 Lance1ot 阅读(123) 评论(0) 推荐(0)
摘要: 偶然翻看我缝缝补补的luogu第一回夏令营讲义。发现还有tarjan缩点没看。于是就来学了学 tarjan类似于在搜索树上的算法 dfn为dfs到的时间,为时间戳。 low为当前节点能回到的dfs序最小的节点。 若一个节点在dfs树上能回到的最前节点,那么以他为根节点上的子树就是一个强联通分量(因为 阅读全文
posted @ 2018-03-12 20:00 Lance1ot 阅读(139) 评论(0) 推荐(0)