强连通分量
★漂浮ing☆
奋斗ing
展开
-
加边变不连通
Give a simple directed graph with N nodes and M edges. Please tell me the maximum number of the edges you can add that the graph is still a simple directed graph. Also, after you add these edges, this...原创 2019-11-24 22:20:22 · 140 阅读 · 0 评论 -
强连通缩点+拓扑排序(好题)
In order to make their sons brave, Jiajia and Wind take them to a big cave. The cave has n rooms, and one-way corridors connecting some rooms. Each time, Wind choose two rooms x and y, and ask one of ...原创 2019-11-24 12:30:13 · 616 阅读 · 0 评论 -
强连通+缩点+最短路
After retirement as contestant from WHU ACM Team, flymouse volunteered to do the odds and ends such as cleaning out the computer lab for training as extension of his contribution to the team. When Chr...原创 2019-11-22 11:49:43 · 183 阅读 · 0 评论 -
强连通分量
为了训练小希的方向感,Gardon建立了一座大城堡,里面有N个房间(N<=10000)和M条通道(M<=100000),每个通道都是单向的,就是说若称某通道连通了A房间和B房间,只说明可以通过这个通道由A房间到达B房间,但并不说明通过它可以由B房间到达A房间。Gardon需要请你写个程序确认一下是否任意两个房间都是相互连通的,即:对于任意的i和j,至少存在一条路径可以从房间i到房间j,...原创 2019-11-18 22:41:45 · 82 阅读 · 0 评论 -
无向联通图定向改造成强连通
According to the Automobile Collision Monitor (ACM), most fatal traffic accidents occur on two-way streets. In order to reduce the number of fatalities caused by traffic accidents, the mayor wants to ...原创 2019-11-18 22:24:10 · 384 阅读 · 0 评论 -
0-1MST
Ujan has a lot of useless stuff in his drawers, a considerable part of which are his math notebooks: it is time to sort them out. This time he found an old dusty graph theory notebook with a descripti...原创 2019-11-14 13:38:51 · 159 阅读 · 0 评论