Company: Algo University SDE 2nd round_21april
Difficulty: medium
Imagine you're in a vast, dark field at night. To stay safe from the unknown dangers in the dark, you must always remain in the light. There are N lamps scattered around, each casting a perfect circle of light on the ground. Your goal is to find a safe path from a starting point S to an ending point T . Your entire path must stay inside the lighted circles. You can move freely within any single circle of light, and you can cross from one lit circle to another wherever their areas overlap or touch. A point on the very edge of a circle is considered safe. Determine if it's possible to find a path from S to T by staying completely within the lit-u p areas. Input Format: The first line contains a single integer N , the number of lamps. The next N lines each describe a lamp with three real numbers: X i , Y i , R i . These are the coordinates of the lamp's center ( X i , Y i ) and the radius R i of its light. The final line contains four real numbers: X s , Y s , X t , Y t . These are the co