[Community Puzzle] Detective Pikaptcha EP2


#1

https://www.codingame.com/training/easy/detective-pikaptcha-ep2

Send your feedback or ask for help here!

Created by @java_coffee_cup,validated by @eulerscheZahl,@MadKnight and @pac-nam.
If you have any issues, feel free to ping them.


#2

hi. all tests pass in IDE but during validation, “trapped” test fails (?!). Pikaptcha is trapped on a cell and can’t go anywhere. If I initialize the cell with value “0”, it fails, value “1”, it fails, value " ", it fails. I can’t figure out the value awaited in this case.
Can you just tell me what is the value awaited.
Best regards


#3

Hello, I have printed out the inputs and it seems there is no pikaptcha character such as < > ^ v but only the map that consists with 0s and #s


#4

i’m getting back in shape currently on coding, so I’m training in python on easy puzzles first and I could pass all the tests here except for the last 2, I get a “stacktrace too big” error, I think because of the recursivity I use and my non-optimal code writing :sweat_smile: is it possible to give me a hint on the solution thinking ? :hugs:


#5

In the trapped cell the value is 0. All other cells’ values have to be the same as the input.


#6

Which map are you referring to? Are you dealing with EP1?


#7

When a function is called, its variables get memory allocated on the stack. And whenever the function call is over, the memory for the variables is deallocated. Declare no variable within your recursive function to avoid stack overflow.


#8

Thank you for the hint, I’ll try that ! :blush:


#9

Solution doesn’t compute after validation / it keeps loading forever…


#10

Using the online version, when it times-out it will stop your code from running forever.


#11

We had an issue with the platform. It is fixed now, you can submit again your solution.


#12

Every test passes but while submitting the Two chambers test fails. What is the validation doing differently?