东大OJ-Prim算法

这是一道来自东北大学在线评测系统(OJ)的题目,要求利用Prim算法找出连接所有需要清扫的雪地点的最短路径长度。题目描述中提到,由于大雪过后,学校需要清扫出一条连通的道路,而清扫的长度需要最小化。输入包含多组数据,每组数据给出需要清扫的点的坐标,输出为最短路径的长度(保留一位小数)。
摘要由CSDN通过智能技术生成

1222: Sweep the snow

时间限制: 1 Sec  内存限制: 128 MB
提交: 28  解决: 18
[ 提交][ 状态][ 讨论版]

题目描述

After the big big snow yesterday, NEU became a beautiful silver world.In the morning, poor michaelalan got a short message which told him to sweep the whole school snow and make the traffic unblocked. As you see, it needs so much time to do by one person.There are some points need clear,and these points must connected together(eg:If there are A point and B point, then sweep a line between A and B is enough). So he wants to know the minimum length of snow he need

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值