시간 제한 | 메모리 제한 | 제출 | 정답 | 맞힌 사람 | 정답 비율 |
---|---|---|---|---|---|
20 초 (추가 시간 없음) | 1024 MB | 11 | 0 | 0 | 0.000% |
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 T: the number of test cases. T test cases follow. Each test case consists of three lines. The i-th of those lines consists of three integers Xi, Yi, and Zi, 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 10-6 of the correct answer.
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
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 1/3. Our three spheres should be centered at (-2/3, 0, 0), (0, 0, 0), and (2/3, 0, 0).
Contest > Google > Kick Start > Google Kick Start 2017 > Round E C번