z-radars
Little Z. gained a control of N radar stations. Each of the radar stations are on the field, and its position can be represented with x,y coordinates (in arbitrary units). Each of the radars, can communicate with all the radars that are not more than R units away.
For security reasons, you have group the radar stations into groups so that each group has the following property:
If you block signal from one radar to some other radar from the same group, there has to be some way for these two radars to communicate through the radars from the same group.
The groups might contain only one radar! They can have one or more radars.
But you should optimize the total number of groups, the number of groups should be minimal.
For given locations of the radars, and the range of the radars R, find the number of groups that have the property described above
6 3
1 1
1 2
2 2
10 10
11 11
11 10Output:
24 2
1 1
2 2
3 3
4 4Output:4Explanation: In this case, the groups are the single radars!
Submit solution
Coming laterThe grading service will be connected in a later migration step. You can inspect the task and your previous results now.