When all the cells that don't contain mines have been revealed, the game ends, and you win.įor example, an initial configuration of the board may look like this ('*' denotes a mine, and 'c' is the first clicked cell): *.*.**. Additionally, if the revealed cell contains a 0, then all of the neighbors of the revealed cell are automatically revealed as well, recursively. Two cells are neighbors if they share a corner or an edge. Otherwise, the revealed cell will contain a digit between 0 and 8, inclusive, which corresponds to the number of neighboring cells that contain mines. If the revealed cell contains a mine, then the game is over, and you lose. ![]() There are M mines hidden in M different cells of the grid. The content of each cell is initially hidden. In this problem, you are playing a game on a grid of identical cells. ![]() This problem has a similar idea, but it does not assume you have played Minesweeper. Minesweeper is a computer game that became popular in the 1980s, and is still included in some versions of the Microsoft Windows operating system. Note: If you have a different method from the ones discussed in answers, please share it so we can expand our knowledge of the different ways to solve this problem. ![]() This is a problem from Google Code Jam qualification round (which is over now).
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |