Problem Statement | |||||||||||||
You are the commander of a military operation that is focused on determining the location of an enemy unit. Two radar stations have provided measurements of their calculated distance from the enemy unit. You are given the locations of your radar stations in ints x1, y1 and x2, y2, and the calculated distances in ints r1 and r2, respectively. You are to return an int indicating the number of possible locations of the enemy unit. If there are an infinite number of possible locations, return -1. | |||||||||||||
Definition | |||||||||||||
| |||||||||||||
Constraints | |||||||||||||
- | x1 will be between -1000000000 and 1000000000, inclusive. | ||||||||||||
- | y1 will be between -1000000000 and 1000000000, inclusive. | ||||||||||||
- | r1 will be between 1 and 1000000000, inclusive. | ||||||||||||
- | x2 will be between -1000000000 and 1000000000, inclusive. | ||||||||||||
- | y2 will be between -1000000000 and 1000000000, inclusive. | ||||||||||||
- | r2 will be between 1 and 1000000000, inclusive. | ||||||||||||
Examples | |||||||||||||
0) | |||||||||||||
| |||||||||||||
1) | |||||||||||||
| |||||||||||||
2) | |||||||||||||
| |||||||||||||
3) | |||||||||||||
|