Neither of your examples are snakes. All the snakes are like the ones you can see in the test cases.
Hello,
I have a problem with validator ā04 - Validator Hard (One VERY large snake)ā.
Itās not an optimization problem.
How can I pass all the tests but not this validator?
Thanks in advance
I think you have to build some custom cases to test your code. That validator is larger than 60x60 and contains a long snake which spirals inwards (instead of outwards which is the situation of the corresponding test case).
thx for reply, i found a problem.
Function recursive is bad with Python (1000 by default), and set up with sys.setrecursionlimit(10**7) cause crash python.exe
You donāt need recursion for this problem. As no ambiguous cases are tested, you can be sure that there is only one valid path when you move along a snake.
Hi, I just did this problem, but have an issue. I solved the problem and all the test cases work with it, but the same test cases donāt work when I submit my solution.
When I test my problem in the IDE I get test case 4 and 5 correct:
But when I submit my code, I get cases 4 and 5 wrong even though they are the same test cases:

I understand that some validators can differ from the test cases, but these two have the same name, so I am not sure.
Thanks
They have the same name but the inputs are still different.
Ok, Thanks!
Hi, I canāt make the last validator work, Iāve tester many cases but still canāt solve it.
What is specific in this validator ?
Please refer to my earlier reply above.
Ah this one was my missing logical piece.
Nice puzzle, nice build-up of cases for step-by-step working towards a full solution.
The last validator fails because it thinks my code is hardcoded, please fix for all! Thank you.
Thatās just a general message. The core part of the message is that tests and validators are different, and thatās very likely because that validator you fail contains an aspect that your code doesnāt handle correctly and that aspect isnāt featured in any other cases.
