[Community Puzzle] No More Pythons, Please!

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:

image

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.