#P7069. [NWRRC 2014] Joy of Flight
[NWRRC 2014] Joy of Flight
题目描述
Jacob likes to play with his radio-controlled aircraft. The weather today is pretty windy and Jacob has to plan flight carefully. He has a weather forecast — the speed and direction of the wind for every second of the planned flight.
The plane may have airspeed up to units per second in any direction. The wind blows away plane in the following way: if airspeed speed of the plane is and the wind speed is , the plane moves by each second.

Jacob has a fuel for exactly seconds, and he wants to learn, whether the plane is able to fly from start to finish in this time. If it is possible he needs to know the flight plan: the position of the plane after every second of flight.
输入格式
The first line of the input file contains four integers — coordinates of start and finish ().
The second line contains three integers and — the number of wind condition changes, duration of Jacob’s flight in seconds and maximum aircraft speed ().
The following lines contain the wind conditions description. The -th of these lines contains integers and — starting at time the wind will blow by vector each second ($0 = t_1 < ··· < t_i < t_{i+1} < ··· < k; \sqrt{w_{x_i}^2 + w_{y_i}^2} ≤ v_{\max}$).
输出格式
The first line must contain Yes if Jacob’s plane is able to fly from start to finish in k seconds, and No otherwise.
If it can to do that, the following lines must contain the flight plan. The -th of these lines must contain two floating point numbers and — the coordinates of the position () of the plane after -th second of the flight.
The plan is correct if for every it is possible to fly in one second from to some point , such that distance between and doesn’t exceed , where . Moreover the distance between and should not exceed as well.
1 1 7 4
2 3 10
0 1 2
2 2 0
Yes
3 2.5
5 2.5
7 4
提示
Time limit: 2 s, Memory limit: 256 MB.