Networking
| Time Limit: 1000MS | Memory Limit: 10000K | |
| Total Submissions: 3788 | Accepted: 2043 |
Description
You are assigned to design network connections between certain points in a wide area. You are given a set of points in the area, and a set of possible routes for the cables that may connect pairs of points. For each possible route between two points, you are given the length of the cable that is needed to connect the points over that route. Note that there may exist many possible routes between two given points. It is assumed that the given possible routes connect (directly or indirectly) each two points in the area.
Your task is to design the network for the area, so that there is a connection (direct or indirect) between every two points (i.e., all the points are interconnected, but not necessarily by a direct cable), and that the total length of the used cable is minimal.
Your task is to design the network for the area, so that there is a connection (direct or indirect) between every two points (i.e., all the points are interconnected, but not necessarily by a direct cable), and that the total length of the used cable is minimal.

这篇博客介绍了如何使用Prim算法解决POJ 1287 Networking问题。文章通过C++代码展示了Prim算法的实现过程,该算法用于寻找最小生成树,确保在网络中连接每个节点的最低成本路径。
最低0.47元/天 解锁文章
775

被折叠的 条评论
为什么被折叠?



