1222:EXTENDED LIGHTS OUT
描述
In an extended version of the game Lights Out, is a puzzle with 5 rows of 6 buttons each (the actual puzzle has 5 rows of 5 buttons each). Each button has a light. When a button is pressed, that button and each of its (up to four) neighbors above, below, right and left, has the state of its light reversed. (If on, the light is turned off; if off, the light is turned on.) Buttons in the corners change the state of 3 buttons; buttons on an edge change the state of 4 buttons and other buttons change the state of 5. For example, if the buttons marked X on the left below were to be pressed,the display would change to the image on the right.

The aim of the game is, starting from any initial set of lights on in the display, to press buttons to get the display to a state where all lights are off. When adjacent buttons

这是一个关于C++编程解决扩展版Lights Out游戏的谜题,目标是从任意初始亮灯状态通过按按钮使所有灯关闭。每个按钮操作会改变自身及其相邻四个方向的灯的状态。解决方案中,输出1表示需要按下的按钮,0表示不需要按下。
最低0.47元/天 解锁文章
557

被折叠的 条评论
为什么被折叠?



