Building a Space Station
Time Limit: 1000MS   Memory Limit: 30000K
Total Submissions: 5874   Accepted: 2914

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 station is made up with a number of units, called cells. All cells are sphere-shaped, but their sizes are not necessarily uniform. Each cell is fixed at its predetermined position shortly after the station is successfully put into its orbit. It is
quite strange that two cells may be touching each other, or even may be overlapping. In an extreme case, a cell may be totally enclosing another one. I do not know how such arrangements are possible. 



All the cells must be connected, since crew members should be able to walk from any cell to any other cell. They can walk from a cell A to another cell B, if, (1) A and B are touching each other or overlapping, (2) A and B are connected by a `corridor', or
(3) there is a cell C such that walking from A to C, and also from B to C are both possible. Note that the condition (3) should be interpreted transitively. 



You are expected to design a configuration, namely, which pairs of cells are to be connected with corridors. There is some freedom in the corridor configuration. For example, if there are three cells A, B and C, not touching nor overlapping each other, at least
three plans are possible in order to connect all three cells. The first is to build corridors A-B and A-C, the second B-C and B-A, the third C-A and C-B. The cost of building a corridor is proportional to its length. Therefore, you should choose a plan with
the shortest total length of the corridors. 



You can ignore the width of a corridor. A corridor is built between points on two cells' surfaces. It can be made arbitrarily long, but of course the shortest one is chosen. Even if two corridors A-B and C-D intersect in space, they are not considered to form
a connection path between (for example) A and C. In other words, you may consider that two corridors never intersect. 

Input

The input consists of multiple data sets. Each data set is given in the following format. 





x1 y1 z1

posted on 2017-06-19 10:53 cynchanpin 阅读(...) 评论(...) 编辑 收藏

var allowComments=true,cb_blogId=347763,cb_entryId=7047739,cb_blogApp=currentBlogApp,cb_blogUserGuid='43c87c18-831e-e711-9fc1-ac853d9f53cc',cb_entryCreatedDate='2017/6/19 10:53:00';loadViewCount(cb_entryId);var cb_postType=1;var isMarkdown=false;

poj2031-Building a Space Station(最小生成树,kruskal,prime)的更多相关文章

  1. POJ2031 Building a Space Station 2017-04-13 11:38 48人阅读 评论(0) 收藏

    Building a Space Station Time Limit: 1000MS   Memory Limit: 30000K Total Submissions: 8572   Accepte ...

  2. POJ 2031 Building a Space Station (最小生成树)

    Building a Space Station Time Limit: 1000MS   Memory Limit: 30000K Total Submissions: 5173   Accepte ...

  3. POJ 2031:Building a Space Station 最小生成树

    Building a Space Station Time Limit: 1000MS   Memory Limit: 30000K Total Submissions: 6083   Accepte ...

  4. POJ-2031 Building a Space Station (球的最小生成树)

    http://poj.org/problem?id=2031 Description You are a member of the space station engineering team, a ...

  5. Building a Space Station(kruskal,说好的数论呢)

    Time Limit: 1000MS   Memory Limit: 30000K Total Submissions: 3820   Accepted: 1950 Description You a ...

  6. POJ - 2031C - Building a Space Station最小生成树

    You are a member of the space station engineering team, and are assigned a task in the construction ...

  7. POJ Building a Space Station 最小生成树

    Time Limit: 1000MS   Memory Limit: 30000K Total Submissions: 15664   Accepted: 6865 Description You ...

  8. POJ2031 Building a Space Station【最小生成树】

    题意: 就是给出三维坐标系上的一些球的球心坐标和其半径,搭建通路,使得他们能够相互连通.如果两个球有重叠的部分则算为已连通,无需再搭桥.求搭建通路的最小边长总和是多少. 思路: 先处理空间点之间的距离 ...

  9. poj2031 Building a Space Station

    这题目,用G++ WA,用C++ AC. 题目要求,现给出n个球,然后要使每两个球直接或者间接连通,可以在任意两球之间做管道(在表面),最后的要求是,如果使得都连通的话,管道最小长度是多少. 思路简单 ...

  10. POJ 2031 Building a Space Station 最小生成树模板

    题目大意:在三维坐标中给出n个细胞的x,y,z坐标和半径r.如果两个点相交或相切则不用修路,否则修一条路连接两个细胞的表面,求最小生成树. 题目思路:最小生成树树模板过了,没啥说的 #include& ...

随机推荐

  1. ASM磁盘组中的AU与条带

    一.AU与条带(AU和条带就是一个分配单位,数据会被以一定单位分割,存储在多个磁盘中.分割单位的大小由AU.条带来决定. ASM有两种条带: 1.不可调粗粒度: 相当于ASM没有条带,或者说AU就是条 ...

  2. 转 c#中 base64字符串与普通字符串互转

    https://blog.csdn.net/hwt0101/article/details/79758912 转成 Base64 形式的 System.String:    string a = &q ...

  3. 【Paper Reading】Bayesian Face Sketch Synthesis

    Contribution: 1) Systematic interpretation to existing face sketch synthesis methods. 2) Bayesian fa ...

  4. WPF 封装 dotnet remoting 调用其他进程

    原文:WPF 封装 dotnet remoting 调用其他进程 本文告诉大家一个封装好的库,使用这个库可以快速搭建多进程相互使用. 目录 创建端口 调用软件 运行的类 运行C++程序 通道 使用 在 ...

  5. CAD二次开发(01)-绘制直线

    using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.T ...

  6. 【BZOJ 1191】[HNOI2006]超级英雄Hero

    [链接] 我是链接,点我呀:) [题意] 在这里输入题意 [题解] 二分图的最大匹配. 因为要答下一题,这一题必须先答完. 所以如果某道题没有匹配了. 那么就直接break掉. [代码] #inclu ...

  7. 【BZOJ 1005】[HNOI2008]明明的烦恼(暴力化简法)

    [题目链接]:http://www.lydsy.com/JudgeOnline/problem.php?id=1005 [题意] 中文题 [题解] 一棵节点上标有序号的树会和一个prufer数列唯一对 ...

  8. 2015 Multi-University Training Contest 2 hdu 5303 Delicious Apples

    Delicious Apples Time Limit: 5000/3000 MS (Java/Others)    Memory Limit: 524288/524288 K (Java/Other ...

  9. orale 中创建定时任务

    --添加变量 variable job1 number; --创建JOB begin   dbms_job.submit(:job1,'testjob;',sysdate, 'TRUNC(sysdat ...

  10. 重写MPAndroidChart显示标记

    MPAndroidChart是实现图表功能的优秀控件, 能够完毕大多数绘制需求. 对于改动第三方库而言, 优秀的架构是继承开发, 而不是把源代码拆分出去. MP在显示标记控件(MarkView)时, ...