Editorial for Canada Day Contest 2021 - Fine Art
Submitting an official solution before solving the problem yourself is a bannable offence.
There are only possible colours.
Try putting the coordinates on a grid graph.
Perform a multisource breadth first search from each of the wool colours to find the closest wool for every possible colour. Now the answer to each query has been calculated.