E - Everybody may get lost in space
08.01.2010
Time limit: 16 s 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 , and coordinates, but also the bound on observational error. The error applies to the distance from point , meaning that whenever a system reports , the correct shuttle's coordinates might be any with . 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. Multiple Test CasesThe input contains several test cases. The first line of the input contains a positive integer , denoting the number of test cases. Then test cases follow, each conforming to the format described in section Single Instance Input. For each test case, your program has to write an output conforming to the format described in section Single Instance Output. Single Instance InputThe input instance consists of three lines, each containing a single independent measure. Each measure consists of coordinates and the observational error separated by single spaces. Single Instance OutputYour 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 . ExampleInput2 0 0 0 10 19 0 0 10 23 0 0 10 0 0 0 10 12 0 0 10 18 0 0 10 Output9602.0161463094 9334.7189713665 Nie możesz wysyłać i oglądać rozwiązań tego zadania ponieważ nie jesteś zalogowany. Zaloguj się lub załóż konto. |
Copyright © 2008-2010 Wrocławski Portal Informatyczny
design: rafalpolito.com