POJ 1861 && ZOJ 1542--Network 【最小生成树 && kruscal && 水题】

该博客讲述了如何解决一个网络连接问题,目标是找到一个网络连接方案,使得所有节点间都能通过连接路径到达,同时单条电缆的最大长度最小。问题转化为寻找最小生成树,给出输入输出样例,并强调最大边应为所有生成树中最小的。解决方案是构建最小生成树。
摘要由CSDN通过智能技术生成

Network

Time Limit: 2 Seconds      Memory Limit: 65536 KB      Special Judge

Andrew is working as system administrator and is planning to establish a new network in his company. There will be N hubs in the company, they can be connected to each other using cables. Since each worker of the company must have access to the whole network, each hub must be accessible by cables from any other hub (with possibly some intermediate hubs).

Since cables of different types are available and shorter ones are cheaper, it is necessary to make such a plan of hub connection, that the maximum length of a single cable is minimal. There is another problem - not each hub can be connected to any other one because of compatibility problems and building geometry limitations. Of

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值