阅读背景:

PAT A1013 2019.08.07 【DFS BFS 连通分量】_一个非计算机专业的 博客

来源:互联网 

1013 Battle 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 must know immediately if we need to repair any other highways to keep the rest of the cities connected. Given the map of cities which have all the remaining highways marked, you are supposed to tell the number of highways need to be repaired, quickly.It is vitally




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: