![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
强连通分量
Last0rder
最后之作
展开
-
scoj2832: Mars city fzoj1462
Time Limit: 1000 mSec Memory Limit : 32768 KBProblem DescriptionYear 2900. Many people left Earth and built some cities on Mars.Currently there are N cities, some of which are connected b原创 2015-02-11 14:50:24 · 950 阅读 · 0 评论 -
codeforces 505 D Mr. Kitayuta's Technology
题意:给出n个点,m条有向边,问构造一个新图,最少几条边可以让任意两点间的连通性跟原图一样。做法:首先做出强连通分量,很显然对于有向图而言,若分图的点不唯一必定成环,当然啦,还需要做的是把这些分图再连起来变成弱连通分量,若某个弱连通分量的点数为v,若有环则贡献v条边,否则贡献v-1条边。#include#include#include#include#include#includ原创 2015-08-01 20:10:09 · 1063 阅读 · 0 评论