Curse the Darkness
You are trying to read in a dark room. The room contains many candles, but none are lit. You are considering that it might be worthwhile to light one, but before you do you want to be certain that it will actually light your book. You only get to light one and each is bright enough to cast light in a radius of $8$ meters. You are a stubborn reader and you are not willing to move your book or one of the candles.
Input begins with an integer $0 \le m \le 50$, giving the number of test cases that follow. A test case begins with the real-valued $X, Y$ location of your book. This is followed by an integer $0 \le n \le 1\, 000$, giving the number of candles in the room and the real-valued $X, Y$ locations of each candle. All locations are measured in meters. All real values in the input are in the range $-1\, 000$ to $1\, 000$ and have at most $7$ digits past the decimal point.
For each test case, output “light a candle” if there is a candle close enough to cast light on the position of your book. Otherwise, output “curse the darkness”.
|Sample Input 1||Sample Output 1|
2 10 10 1 15 15 10 10 2 20.5 10 10 20.5
light a candle curse the darkness