Introduction - If you have any usage issues, please Google them yourself
Description
Given a r* c contains only numbers 0 and 1 matrix , the matrix for any point (x, y), the definition (x, y) has a weight of (x, y) to the minimum Manhattan distance to this point a Manhattan distance (if mat [x] [y] = 1, then (x, y) has a weight of 0 .) The right to request all the points for a given value of 01 and the matrix .
The so-called Manhattan distance- the distance between two points in the north-south direction with a distance in the east-west direction , i.e., D (I, J) = | XI-XJ |+ | YI-YJ |. For having a north south , east town street layout rules due west direction , from one point to another point is the distance to the north-south direction of travel distance plus the distance traveled east-west direction and therefore also known as Manhattan distance taxi distance, Manhattan distance is not a distance invariant , when changes in the axis , the distance between points will be different.
Input
Input contains multiple sets of data , each data of the