Problem F
Flint Flinger
During medieval times, the catapult was a common siege weapon used to attack neighboring cities at a distance. Before they were invented, however, the placement of cities did not account for this future technology. Some cities therefore settled very close to each other, which now puts them under the constant threat of being launched large boulders of flint at!
Each city needs to evaluate how large the threat is. They do so by counting the number of other cities that can launch flint boulders at them. To calculate this correctly they also take into consideration how mature the local technology is, which causes some variation in the range of the catapults.
Input
The first line of input contains the number $N$, the number of cities. Then follows $N$ lines, with three numbers each. The first two numbers are the $x_i$ and $y_i$ coordinates of the city, and the third number, $r_i$ is the range of the catapult in that city. You may consider the cities as points in the cartesian plane, and it is guaranteed that no two cities coincide on the same coordinate. These three decimal numbers are separated by a single space and always have one digit after the decimal point.
Output
For each city, output the number of cities that can launch a flint boulder at it on a separate line.
Limits
-
$1 \leq N \leq 100$
-
$0 \leq x_i, y_i, r_i \leq 100$
| Sample Input 1 | Sample Output 1 |
|---|---|
4 10.0 10.0 11.0 20.0 10.0 2.0 50.0 50.0 100.0 90.0 90.0 10.0 |
1 2 0 1 |
| Sample Input 2 | Sample Output 2 |
|---|---|
2 0.2 0.0 0.9 1.1 0.0 0.9 |
1 1 |
