Logo
(追記) (追記ここまで)

7874번 - Everybody may get lost in space 스페셜 저지다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 512 MB1151156.944%

문제

As we all know, all essential systems of a space shuttle are “redundantly replicated” just in case. In the cold and empty space, the key question to a successful navigation is the centuries-old “weremay?” Luckily, in accordance to aforementioned rule, the shuttle’s coordinates can be obtained from three independent sources. These systems provide not only $x,ドル $y$ and $z$ coordinates, but also the bound $b$ on observational error. The error applies to the distance from point ($x, y, z$), meaning that whenever a system reports ($x, y, z$), the correct shuttle’s coordinates might be any ($x', y', z'$) with $\sqrt{(x - x')^2 + (y - y')^2 + (z - z')^2} \le b$. Truth be told, it’s not easy to determine the shuttle’s position given as many as its three measures. Your task is to determine the volume of the (sub-)space in which the shuttle is possibly contained. At least one of the three systems is intact, but it might be the case that the others are broken.

입력

The input contains several test cases. The first line of the input contains a positive integer $Z \le 10000,ドル denoting the number of test cases. Then $Z$ test cases follow.

The input instance consists of three lines, each containing a single independent measure. Each measure consists of coordinates $x, y, z \in [−10^9, 10^9]$ and the observational error $b \in [1, 10^9]$ separated by single spaces.

출력

Your program is to print out the volume of the (sub-)space in which the shuttle is possibly contained. Your result is going to be accepted if and only if it is accurate to within a relative or absolute value of at most 10ドル^{-6}$.

제한

예제 입력 1

2
0 0 0 10
19 0 0 10
23 0 0 10
0 0 0 10
12 0 0 10
18 0 0 10

예제 출력 1

9602.0161463094
9334.7189713665

힌트

출처

ICPC > Regionals > Europe > Central European Regional Contest > CERC 2009 E번

(追記) (追記ここまで)

출처

대학교 대회

  • 사업자 등록 번호: 541-88-00682
  • 대표자명: 최백준
  • 주소: 서울시 서초구 서초대로74길 29 서초파라곤 412호
  • 전화번호: 02-521-0487 (이메일로 연락 주세요)
  • 이메일: contacts@startlink.io
  • 통신판매신고번호: 제 2017-서울서초-2193 호

AltStyle によって変換されたページ (->オリジナル) /