Description
There is a
square wall which is made of n*n small square bricks. Some bricks are
white while some bricks are yellow. Bob is a painter and he wants to
paint all the bricks yellow. But there is something wrong with Bob's
brush. Once he uses this brush to paint brick (i, j), the bricks at (i,
j), (i-1, j), (i+1, j), (i, j-1) and (i, j+1) all change their color.
Your task is to find the minimum number of bricks Bob should paint in
order to make all the bricks yellow.
Input
The
......
阅读全文