解题报告:Painter's Problem
题目来源:http://acm.pku.edu.cn No.1681
解法或类型: 枚举+位运算,或解方程组
作者:杭杰
Painter's Problem
Time Limit:1S Memory Limit:1000K
Total Submit:63 Accepted:32
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.