|
#6 CHESS COLORS
You have an 8x8 table on a computer screen with all squares colored to white. In each step you will select any square and as a result all the squares on the same row and column -including the selected square itself- will switch their colors (white becomes black, and black becomes white).
What is the minimum number of steps required for obtaining a standard colored chessboard?
棋盘颜色
在一台电脑屏幕上有一个8x8的表,所有的方块都是白色。 在每个步骤中,你可以选择任何一个方块,结果在相同的行和列的所有方块——包括所选择的方块本身——都会切换颜色(白变黑,黑变白)。
得到一个标准棋盘(黑白相间)所需的最少步骤是多少?
----------
这道题似曾相识,楼上说不定又有答案了。
如果尺寸小一些,用SQL来暴力解还是很有趣的。
|
|