I made a mistake in my interpretation of the original problem statement. In the original problem it was allowed, that two mines are adjacent, like in this example:
- Code: Select all
6 5
#####
# #
# **#
# **#
# #
#####
A solution would be:
- Code: Select all
#####
# #
# --#
# --#
# #
#####
I thought that it is always invalid to have more than 2 adjacent grid squares that belong to a mine.
For example this is one of my test cases and my solution for it:
- Code: Select all
10 10
##########
#........#
#..*.*...#
#...*....#
#..*..*..#
#...*....#
#..*.*...#
#........#
#........#
##########
20
##########
#..X.X...#
#..*.*...#
#...*X...#
#XX*..*XX#
#...*X...#
#..*.*...#
#..X.X...#
#..X.X...#
##########
Please tell me, what do you think? Shall I change the problem statement and the solution, or just clarify the "new" problem with more examples, or shall I add another problem that is like the original problem?
