Mineral deposits
Time limit2sMemory limit1024 MB
Locate k hidden deposits in a grid of half-width b using probe waves that return Manhattan distances, with as few waves as possible.
- Level
Hard8 of 10
- Topics
- Math, Geometry, Implementation
- Solved
- No attempts yet
Problem
You handle signal processing for an extra-terrestrial mining company. Your vessel is approaching an asteroid. Preliminary scans show mineral deposits on the asteroid, but their exact locations are unknown.
The surface of the asteroid is a grid of integer coordinates. The th deposit is at unknown integer coordinates with and , for some integer that corresponds to the size of your initial scan.
To find the exact locations, you may send probes to the surface. Probes are sent out in waves of several probes at once.
Suppose you send a wave of probes to coordinates for . When a probe arrives, it measures the Manhattan distance to each of the deposits and sends the distances back to the ship. All data packets arrive at the same time, and you cannot tell which probe returned which distance. So the wave returns the integer distances
You need to minimise the number of waves of probes sent to the surface.
Constraints
We always have , , and .