Public Judge

pjudge

Límite de tiempo: 0.2 s Límite de memoria: 512 MB Puntuación total: 100

#21605. 【PTR #1】A + B Problem

Estadísticas

Given three non-overlapping spheres in space with different radii, calculate the volume of the convex hull formed by all points inside the three spheres.

Input

The input consists of three lines, each containing four integers $x_i, y_i, z_i, r_i$ ($1 \leq r_i \leq 100, 0 \leq x_i, y_i, z_i \leq 100$).

Output

Output a single real number representing the answer. Your answer will be considered correct if the absolute or relative error does not exceed $10^{-6}$.

Examples

Input 1

10 0 0 1
0 10 0 2
0 0 10 3

Output 1

691.832383333484585819

Subtasks

Test Case ID Special Properties
$1$ $y_i=z_i=0$
$2 \sim 3$ $z_i = 0$
$4 \sim 5$ $x_1 < x_2 < x_3, y_1 < y_2 < y_3, z_1 < z_2 < z_3$
$6 \sim 10$ No additional constraints

Discussions

About Discussions

The discussion section is only for posting: General Discussions (problem-solving strategies, alternative approaches), and Off-topic conversations.

This is NOT for reporting issues! If you want to report bugs or errors, please use the Issues section below.

Open Discussions 0
No discussions in this category.

Issues

About Issues

If you find any issues with the problem (statement, scoring, time/memory limits, test cases, etc.), you may submit an issue here. A problem moderator will review your issue.

Guidelines:

  1. This is not a place to publish discussions, editorials, or requests to debug your code. Issues are only visible to you and problem moderators.
  2. Do not submit duplicated issues.
  3. Issues must be filed in English or Chinese only.
Active Issues 0
No issues in this category.
Closed/Resolved Issues 0
No issues in this category.