ZOJ Problem Set - 3834
Tom invented a tracker which can track a comet. He want to know the position of the comet and the tracker in the process of time. After long-term study, he got some relatively simple formulas. When the coordinates of the comet is (x1, y1) and the tracker's is (x2, y2), the velocity vector of the comet is (-A*y1, B*x1) and the tracker's is (K*(x2-y1), K*(y2-x1)). A,B won't be negative and K is always positive. Tom knows the comet is at (x10, y10) and the tracker is at (x20, y20) now, he want to know where will the comet and the tracker be when the time passed t.
There are multiple cases. Each case has 8 float numbers: A, B, K , x10, y10, x20, y20, t. Each number has at most 5 digits after the decimal point. (0≤ A, B ≤ 1; 0< K≤ 1; -5< x10, y10, x20, y20< 5; 0< t< 10)
For each case, output x1(t), y1(t), x2(t), y2(t) in one line. Either absolute error or relative error of the output should be less than 10-8.
1 0.8 1.0 0.5 0.5 1.0 1.00 9 1 0.8 1.0 0.5 0.5 1.000 1.00000 5
-0.645635222115269247 0.341356306476581051 -0.168988993219677197 0.47670793379763543 0.423986599887803517 -0.5533428326927744 -0.0688699306698346836 -0.489487557058095546
The sample from t=0 to t=10.
Anyhow, this is not a problem without a physical background. We can find the corresponding phenomena in the real discrete world. The following example shows is how the final state will be like.
Author: ZHOU, Yuchen
Source: ZOJ Monthly, November 2014