Code Wars V

Program / Task Name:

   Wireless Network




Point Value:




Task Description

The iPAQ Pocket PC from Compaq can access local area networks (LANs) using an 11Mbps wireless LAN card. The card communicates with wireless access points located in and around the LAN. Your task is to write a program to test the coverage area of a set of wireless access points.

To solve this problem you will need to consider that the wireless access points have a limited range of communication which may vary from one model to the next. This means that most WLAN installations will contain more than one wireless access point. Therefore your program will need to read the WLAN installation as a set of (x,y) locations of wireless access points, each with its own service radius.

You will also need to consider the purpose of using a wireless LAN: to provide mobile access to the network. Therefore the test conditions for the WLAN will be straight line-segment paths. Each path from one (x,y) position to another (x,y) position represents a person using an iPaq moving from one point to another.

For each path, your program must determine if the person encounters a "dead" spot - a spot not serviced by any of the wireless access points.

Program Input

The input file contains two sections. Section one contains a list of all the access point locations. Each access point has an (x,y) location and a service radius. Section two is a list of (x,y) pairs indicating path start and stop.

198,202 150
300,500 300
700,500 150
800,200 150
160,420 160,380
460,580 680,580
782,139 758,421
404,306 850,253

Program Output

The output file should list each path (x,y) pair followed by either the phase "DEAD SPOT" or "ACCESS CLEAR".

160,420 160,380 ACCESS CLEAR
460,580 680,580 ACCESS CLEAR
782,139 758,421 ACCESS CLEAR
404,306 850,253 DEAD SPOT


hp Code Wars
Hello -- Dominos?...
  (c) 2004 Hewlett-Packard Company