
ZOJ Problem Set  3226
Mobile positioning is a technology used by telecommunication companies to approximate where a mobile phone is. Although it is not that accurate than some alternatives, such as GPS, it is quick and costs less. In this problem, we consider a special version of mobile positioning with two base stations used. The graph shows how mobile positioning works. P_{1}(x_{1}, y_{1}) and P_{2}(x_{2}, y_{2}) are two base stations communicating with mobile phones. Someone is walking from Point A to Point C in a straight line with constant speed. The positioning has 5 steps:
It is well known that signals go off in all directions, like a series of circles that shares a same center. With the speed of signal v given, please find out the coordinates of ALL possible Point A. Input The input contains no more than 30 cases. Each case contains two lines. The first line is 4 numbers x_{1}, y_{1}, x_{2}, y_{2} (10000 < x_{1}, y_{1}, x_{2}, y_{2} < 10000). The second line has 5 numbers, t_{1}, t_{2}, t_{3}, t_{4}, v (0 ≤ t_{1}, t_{2}, t_{3}, t_{4} < 10000, 0 < v < 10000). Proceed to the end of file. Output For each case, output a single line contains the number of possible Point A, then n lines of the coordinates in the form "x y" in ascending order. Keep two digits after the decimal point. If the number of possible Point A is infinite, simply output 1. You can assume that there is at least one possible Point A. Sample Input 0 12 16 6 6 10 3 5 2 Sample Output 4 0.00 0.00 7.89 21.04 11.08 7.38 11.38 8.19 Author: LI, Cheng Source: ZOJ Monthly, July 2009 