Time Limit: 2000/1000 MS (Java/Others)

Memory Limit: 32768/32768 K (Java/Others)

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.

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 )

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 )

提交代码