|
||||||||||
Easy Fruit NinjaTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 709 Accepted Submission(s): 194 Problem Description YY is a clever boy . Recently he bought a new mobile phone .he is addicted in a game named Fruit Ninja . In the game . The fruit will fly from the bottom of the screen in a parabolic curve(g = 10.0 m/s^2). Your aim is cutting the fruit before the fruit fall down and disappear but you can't cut it at time 0.0 . And YY is a lazy boy. He just want to cut the fruit use the least times . Every time he cut .all the fruit in the same line will be cut. To simple this problem .we regard the fruit as a point . The mobile phone is a Two dimensional coordinate department There are only three Fruit fly into the air. YY want to know if exist a time that three fruit are in a same line and what the time it is. Input In the first line . Only a number T (1 <= T <= 1000) indicate the test case each test case the first line contain three real number x1, x2, x3, indicate the coordinate of the fruit (x1, 0) (x2, 0), (x3, 0) ( - 10000 <= x1, x2, x3 <= 10000) the second line contain three real number v1, v2, v3, indicate the speed of the fruit (0 <= v1, v2, v3 <= 10000) the third line contain three real number a, b, c, indicate the radian of the fruit's direction to the x coordinate ( 0 <= a, b, c <= pi ) Output For each case , output the number of case and the time (round to 4 decimal places), if there are more than one solution , just output "Multiply answer", if there is no answer , just output ¡°-1¡±, .(as shown in the sample output) Sample Input
Sample Output
Author mhl Source | ||||||||||
|