Introduction - If you have any usage issues, please Google them yourself
The need to establish a communications base in an N × M grid, communication base stations must be based only on the grid.
A grid has users, each user s communication cost is a base station to the square of the Euclidean distance between the user.
There grid B a communications company, maintenance cost of the base station is a base station to a recent communication the company (defined as the Manhattan distance away).
The total consideration for the establishment of a base station in the grid is the sum of the user communication cost plus maintenance cost base, the minimum total costs.