logo AlgoBeat OnlineJudge
登录 注册

#216645. [GKS 2017 #E] Blackhole

内存限制:1024 MiB 时间限制:1000 ms 标准输入输出
题目类型:VJudge(洛谷) 评测方式:VJudge
上传者: 匿名

题目描述

Alice is trying to prevent dangerous black holes from threatening Earth. Right now, there are three black holes that are different points in 3-D space. Alice will create exactly three containment spheres, and all three must have the same radius. Spheres do not interfere with each other, so they may overlap.

Alice must place these spheres so that each black hole is covered by at least one sphere. Moreover, to ensure stability, the total set of points covered by at least one sphere must form a single connected area.

Alice wants to solve this critical problem as inexpensively as possible. What is the minimum radius that she can use?

输入格式

The input starts with one line with one integer : the number of test cases. test cases follow. Each test case consists of three lines. The i-th of those lines consists of three integers , , and , representing the 3-D coordinates of the i-th black hole.

输出格式

For each test case, output one line Case #x: y, where x is the test case number (starting from 1) and y is a rational representing the minimum radius that Alice can use to solve the problem. y will be considered correct if it is within an absolute or relative error of of the correct answer. See the FAQ for an explanation of what that means, and what formats of real numbers we accept.

样例

样例输入 1

4
0 0 0
1 0 0
-1 0 0
4 0 0
5 0 0
-2 0 0
0 0 0
1 1 1
-1 -1 -1
-4 2 -2
5 1 -4
0 4 -9

样例输出 1

Case #1: 0.3333333333
Case #2: 1.1666666667
Case #3: 0.5773502692
Case #4: 2.1373179212

数据范围与提示

Note that the last two sample cases would not appear in the Small dataset.

In Sample Case #1, the smallest radius we can use is . Our three spheres should be centered at , and .

Limits

, for all i.

For all j k, . (No two of the points have the same coordinates.)

Small dataset (Test set 1 - Visible)

, for all i.

, for all i.

Large dataset (Test set 2 - Hidden)

, for all i.

, for all i.