1995 ACM South Central Region Programming Contest Problem #5: Radar Scopes Source File: radar.pas radar.cpp radar.bas radar.c Input File: radar.in Output File: radar.out You have been hired to a team of software designers to write a new air- traffic control system. One of the functions of this new software is to automatically verify the functioning of the subject aircrafts' instrumentation and alert controllers to endangered, newly aloft, or possibly downed aircraft. You are to write a prototype of this function. Your program will be given a series of scenarios which include 2 radar sweeps each. Each radar sweep will find 0 to 100 airplanes. Each time a sweep encounters a plane, the data acquisition system captures an azimuth reading and distance (in miles) from the radar. It will also retrieve (from the plane) a squawk number and a ground speed in miles/hour (actually an airspeed with wind corrections). Based on the two radar sweeps, your program is to determine if a warning is required for any plane in the radar's domain. You should assume a radar range (radius of the area covered) of 10 miles and instantaneous sweeps that occur 5 seconds apart. Based on the information about the radar and planes, you are to determine if the controllers should be warned of potential problems. An "equipment warning" is issued if the average of the plane's two indicated airspeeds is not within 10% of the airspeed measured/calculated based on radar sweeps. A "new intrusion" warning is issued if the second radar sweep indicates a plane which was not present in the first sweep, but whose indicated airspeed + 10% is sufficient to have brought the plane onto the scope (on the shortest path) between the two sweeps. If the speed is not sufficient to account for a plane which was already aloft, then the assumption must be made that there is a "new aloft" warning to be issued because a plane has just taken off within the domain of the radar. A "domain exited" warning is issued if the first sweep of the radar indicates a plane which is not seen in the second sweep but whose indicated airspeed + 10% is sufficient to have accounted for the plane leaving the range of the radar (on the shortest path) within the two sweeps. If the speed is not sufficient to allow the plane to leave the radar scope between the sweeps, a "domain loss" warning is issued indicating that the plane has either landed or crashed with the controller's domain. Input The first line of each scenario contains a single integer (0<=N1<=100) that indicates the number of planes detected in the first sweep. The next N1 lines each contain the description of exactly one detected plane in sweep 1. Each description contains a squawk number, an azimuth, a distance, and a ground speed. The squawk number is an integer between 1 and 5 digits in length. The azimuth, distance and ground speed are all real numbers in the format XXX.XXX with leading and trailing zeroes as needed to fill all 6 places. The squawk number (0