题目描述
A ground-to-air radar system uses an antenna that rotates clockwise in a horizontal plane with a period of two seconds. Whenever the antenna faces an object, its distance from that antenna is measured and displayed on a circular screen as a white dot. The distance from the dot to the center of the screen is proportional to the horizontal distance from the antenna to the object, and the angle of the line passing through the center and the dot represents the direction of the object from the antenna. A dot directly above the center represents an object that is north of the antenna; an object to the right of the center represents an object to the east; and so on.
There are a number of objects in the sky. Each is moving at a constant velocity, and so the dot on the screen appears in a different position every time the antenna observes it. Your task is to determine where the dot will appear on the screen the next time the antenna observes it, given the previous two observations. If there are several possibilities, you are to find them all.
输入
The input consists of a number of lines, each with four real numbers: a1, d1, a2, d2. The first pair a1, d1 are the angle (in degrees) and distance (in arbitrary distance units) for the first observation while the second pair a2, d2 are the angle and distance for the second observation.
Note that the antenna rotates clockwise; that is, if it points north at time t = 0.0, it points east at t = 0.5, south at t = 1.0, west at t = 1.5, north at t = 2, and so on. If the object is directly on top of the radar antenna, it cannot be observed. Angles are specified as on a compass, where north is 0 or 360, east is 90, south is 180, and west is 270.
输出
The output consists of one line per input case containing all possible solutions. Each solution consists of two real numbers (with two digits after the decimal place) indicating the angle a3 and distance d3 for the next observation.
样例输入
90.0 100.0 90.0 110.0
90.0 100.0 270.0 10.0
90.0 100.0 180.0 50.0
样例输出
90.00 120.00
270.00 230.00
199.93 64.96 223.39 130.49
参考代码
暂无
解析
暂无