![](https://img-blog.csdnimg.cn/20201014180756926.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
图的遍历
ZXX_1999
这个作者很懒,什么都没留下…
展开
-
1021 Deepest Root (25 分) 并查集+dfs邻接表
1021Deepest Root(25分)A graph which is connected and acyclic can be considered a tree. The height of the tree depends on the selected root. Now you are supposed to find the root that results in a ...原创 2019-11-27 19:51:10 · 212 阅读 · 0 评论 -
1013 Battle Over Cities (25 分) 图的遍历DFS的邻接表法
1013Battle Over Cities(25分)It is vitally important to have all the cities connected by highways in a war. If a city is occupied by the enemy, all the highways from/toward that city are closed. We...原创 2019-11-20 19:44:52 · 150 阅读 · 0 评论 -
1076 Forwards on Weibo (30 分)
1076Forwards on Weibo(30分)Weibo is known as the Chinese version of Twitter. One user on Weibo may have many followers, and may follow many other users as well. Hence a social network is formed wi...原创 2019-11-20 18:53:29 · 137 阅读 · 0 评论 -
1034 Head of a Gang (30 分) 图的遍历DFS 邻接矩阵版
1034Head of a Gang(30分)One way that the police finds the head of a gang is to check people's phone calls. If there is a phone call betweenAandB, we say thatAandBis related. The weight of a...原创 2019-11-20 17:50:50 · 157 阅读 · 0 评论