- Category:
- CSharp
- Tags:
-
[C/C++]
[源码]
- File Size:
- 1kb
- Update:
- 2013-12-07
- Downloads:
- 0 Times
- Uploaded by:
- hd
Description: 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
To Search:
File list (Check if you may need any files):
01.cpp