Minesweeper (walk)
no vote
Background
You play Minesweeper game, right? There is an operating system with the game, the system what do you call it? ;-) In the game, if you want to cross the border, it must be in an NxM took all of the landmines in the area. During the game, the computer will display some statistics on a map to help you determine where there are landmines. For example, 4x4 has two mines in this map (* means mines):
*...
....
. *..
....
Based on the above map, should be made available to the player can be calculated as shown in the figures are as follows:
*100
2210
1*10
1110
Each number represents several mines around the square are, of course, a square around most of the time there will be only eight.
Enter
Input will consist of a series of maps, the first line of each map there are two integers m and n (0<n,m<=100), they represent the number of columns and rows o