Given two sets and of points on the plane, determine, for each point in , the minimum of the Manhattan distances to the points in .
Input consists of a natural , the coordinates of the points in , a natural , and the coordinates of the points in . Assume and . The coordinates are real numbers. Points can be repeated.
For every point in , print the Manhattan distance to its closest point in .
This problem tolerates an error of for each output.
Author: Jordi Petit
Generation: 2026-01-25T10:34:18.335Z
© Jutge.org, 2006–2026.
https://jutge.org