poj2031 Building a Space Station】的更多相关文章

Building a Space Station Time Limit: 1000MS   Memory Limit: 30000K Total Submissions: 8572   Accepted: 4093 Description You are a member of the space station engineering team, and are assigned a task in the construction process of the station. You ar…
http://poj.org/problem?id=2031 Description You are a member of the space station engineering team, and are assigned a task in the construction process of the station. You are expected to write a computer program to complete the task. The space statio…
题意: 就是给出三维坐标系上的一些球的球心坐标和其半径,搭建通路,使得他们能够相互连通.如果两个球有重叠的部分则算为已连通,无需再搭桥.求搭建通路的最小边长总和是多少. 思路: 先处理空间点之间的距离,要注意的是两个球面相交的情况,相交的话距离是0.两球面距离是球心距离减去两个球的半径(边权 = AB球面距离 = A球心到B球心的距离 – A球半径 – B球半径),相交时距离是算出来是负值,要改为0.其实就是求连接所有球最小生成树的过程. 代码: kruskal: #include <iostr…
这题目,用G++ WA,用C++ AC. 题目要求,现给出n个球,然后要使每两个球直接或者间接连通,可以在任意两球之间做管道(在表面),最后的要求是,如果使得都连通的话,管道最小长度是多少. 思路简单,就是求出来每两个球之间的距离,球心差减去两球的半径,注意如果这里是负的则处理为0.然后就是克鲁斯卡尔求最小生成树就可以了. #include <stdio.h> #include <stdlib.h> #include <math.h> #include <stri…
3维空间中的最小生成树....好久没碰关于图的东西了.....              Building a Space Station Time Limit: 1000MS   Memory Limit: 30000K Total Submissions: 3804   Accepted: 1940 Description You are a member of the space station engineering team, and are assigned a task in th…
Building a Space Station Time Limit: 1000MS   Memory Limit: 30000K Total Submissions: 5173   Accepted: 2614 Description You are a member of the space station engineering team, and are assigned a task in the construction process of the station. You ar…
Building a Space Station 题目链接: http://acm.hust.edu.cn/vjudge/contest/124434#problem/C Description You are a member of the space station engineering team, and are assigned a task in the construction process of the station. You are expected to write a…
Building a Space Station Time Limit: 1000MS   Memory Limit: 30000K Total Submissions: 5699   Accepted: 2855 Description You are a member of the space station engineering team, and are assigned a task in the construction process of the station. You ar…
Building a Space Station Time Limit: 1000MS   Memory Limit: 30000K Total Submissions: 7469   Accepted: 3620 Description You are a member of the space station engineering team, and are assigned a task in the construction process of the station. You ar…
链接: http://poj.org/problem?id=2031 http://acm.hust.edu.cn/vjudge/contest/view.action?cid=22013#problem/A Building a Space Station Time Limit: 1000MS   Memory Limit: 30000K Total Submissions: 3578   Accepted: 1830 Description You are a member of the s…