Our alarm system is intended to keep intruders from entering at the front door
of a square room, crossing the room, and then exiting through the back door. It
consists of noise sensors located at various points on the floor of the room.
Each sensor has its own threshold sound level -- it will warn us if the
sound level at the sensor exceeeds its threshold.
The sound generated by an intruder attenuates according to an inverse square
law. Specifically, at a distance r from an intruder, the sound level will be
A/r2, where A is the noisiness of the intruder.
The room is square, with each side of length 100.0. The coordinates of the
southwest corner are (x=0,y=0) and the coordinates of the northeast corner are
(x=100,y=100). The intruder will enter at (50,0) and exit at (50,100).
Given int[]s x, y, and threshold return the largest value of A that will allow an
intruder to walk through the room without setting off an alarm.
The i-th sensor is described by the ith elements of x, y, and threshold. Note
that we cannot expect an intruder to limit his path to integer coordinates!
|