Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
.
Generating test data with only integer solutions is easy enough, you just start by deciding the results and building your system of equations off of that. The description also implies that this is how tests are generated.
I just tested some solutions, and they pass consistently below 10 seconds.
This doesn't occur anymore. Maybe there was a flaw in some old version, but with Python 3.10 it's fine.
I haven't finished the challenge yet but i can say that your alternative solution not consider that you can open the "constants". One example of this is:
realSolution[0][3] = 1
yourSolution[0][3] = 2
depending if hidden number is 1 or 2 you can determinate where is the mine.
You can know that this square can be opened becouse in the two options the square is a number (no can be explode)
(I am sorry if it is not well understood. My english is not good)
regarding the test output, yes it indeed seems there was a mistake there, since the
check_solution
function modified the grid. fixed, thanks!As for your solution, it seems to be indeed false. I created a fork of the interactive version to display this grid: https://openprocessing.org/sketch/1540470, the issue should become clear then.
I am not testing for a certain solution, i just verify if the given solution works.
Here's what's in preloaded:
Hmmm now I cant remember if the kata used integers as solution from the very beginning, or I made it like this. I will check, and add an apropriate note to the description if necessary. I think I could hope this would be covered by "All coefficients are integers [...]", but can't remember exactly now.
You need iterative version for the important function to pass this kata.