For this problem, the positions of beacons and boats are relative to a
rectangular coordinate system. The positive x-axis points east; the
positive y-axis points north. The course is the direction of travel of
the boat and is measured in degrees clockwise from north. That is,
north is 0°, east is 90°, south is 180°, and west is
270°. The relative bearing of a beacon is given in degrees
clockwise relative to the course of the boat. A boat's antenna cannot
indicate on which side the beacon is located. A relative bearing of 90
means that the beacon is toward 90° or 270°.
The boat's course is 75°. The beacon has a relative bearing of
45° from the boat's course.
Coming after the lines of beacon information is an integer specifying a number of boat scenarios to follow. A boat scenario consists of three lines, one for velocity and two for beacon readings.
Data on input line Meaning of data course speed the boat's course, the speed at which it is traveling time#1 name#1 angle#1 time of first beacon reading, name of first beacon, relative bearing of first beacon time#2 name#2 angle#2 time of second reading, name of second beacon, relative bearing of second beaconAll times are given in minutes since midnight measured over a single 24-hour period. The speed is the distance (in units matching those on the rectangular coordinate system) over time. The second line of a scenario gives the first beacon reading as the time of the reading (an integer), the name of the beacon, and the angle of the reading as measured from the boat's course. These 3 fields have single space separators. The third line gives the second beacon reading. The time for that reading will always be at least as large as the time for the first reading.
4 First 2.0 4.0 Second 6.0 2.0 Third 6.0 7.0 Fourth 10.0 5.0 2 0.0 1.0 1 First 270.0 2 Fourth 90.0 116.5651 2.2361 4 Third 126.8699 5 First 319.3987
Scenario 1: Position cannot be determined Scenario 2: Position is (6.00, 5.00)