名校训练1379: Diamond题解

上官魅 算法基础篇 57 0
不断提升技能,才能在职场中立于不败之地!全网最全C++题库,助您成为编程领域的佼佼者。
Diamond mine is a mini-game which is played on an 8 * 8 board as you can see below.The board is filled with different colors of diamonds. The player can make one move at a time. A move is. legal if it swaps two adjacent diamonds and after that, there are three or more adjacent. diamonds in a row or column with the same color. Those diamonds will be taken away and new. diamonds will be put in their positions. The game continues until no legal moves exist.Given the board description. You are going to determine whether a move is legal.

Diamond mine is a mini-game which is played on an 8 * 8 board as you can see below. The board is filled with different colors of diamonds. The player can make one move at a time. A move is legal if it swaps two adjacent diamonds(not diagonally) and after that, there are three or more adjacent diamonds in a row or column with the same color. Those diamonds will be taken away and new diamonds will be put in their positions. The game continues until no legal moves exist. Given the board description. You are going to determine whether a move is legal.

名校训练1379: Diamond题解
-第1张图片-东莞河马信息技术
(图片来源网络,侵删)

标签: 名校训练1379: Diamond题解