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.
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.
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
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
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 is it possible to give me a hint on the solution thinking ?
In the trapped cell the value is 0. All other cellsâ values have to be the same as the input.
Which map are you referring to? Are you dealing with EP1?
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.
Thank you for the hint, Iâll try that !
Solution doesnât compute after validation / it keeps loading foreverâŚ
Using the online version, when it times-out it will stop your code from running forever.
We had an issue with the platform. It is fixed now, you can submit again your solution.
Every test passes but while submitting the Two chambers test fails. What is the validation doing differently?
Hi, Iâve got a quite nasty problem with the âMany Crossesâ validation. My code passes all the test in the IDE and all the other validations except that one. I have copied the map and tested my code offline and it shows the correct answer. Online however it looks like it does itâs own thing and it goes on a completely other route. Any ideas?
Maybe a bug in your code, just a little bug.
That would explain failing the test, but not the different reactions offline/online.
I have the same problem (also my code fails âTrapped v2â). How did you copy the map?
Wow, itâs really funny thing. I expected âdownâ direction to be capital V. But itâs lowercase. And Pikachu faces âdownâ direction only in those two validation cases. Lol
I canât thank you enough :D, now I feel stupid.
Hi !
Iâm having a strange problem while getting the side (âRâ or âLâ input), in Python3
It only works for map #2 (Two chambers), for the others the program stop on the line âside = input()â
What is even more confusing is that if i write âprint(input())â instead of âside = input()â it works, the program writes the character in the output.
Here is the concerned portion of code:
#Get the maze
for y in range(height):
----line = input()
----print(line,file=sys.stderr)
----for x in range(width):
--------c = line[x]
--------if c ==â0â:
------------grid[x][y] = 0
--------elif c in rotation:
------------pika_o = c
------------pika_x = x
------------pika_y = y
------------grid[x][y] = 0
print(âOVERâ,file=sys.stderr)
#print(input(),file=sys.stderr)
side = input()
print(âSIDE :â,side,file =sys.stderr)
Note that by replacing the assignation line with the commented one, it works. With this code, it blocks when getting the last input and times out
Iâm clueless :\
you program timeout, but not at the lines youâre referring. Use sys.stderr.flush() to see the proper standard error. Anyway, it seems you managed to solve it (but didnât submit your Python solution)