The Fall - Episode 1 - Puzzle discussion

Well, after months, I came back to this puzzle and I solved the problem…
I add “\n” to my output !

I am trying to solve this game using c++ but moving of object person left side not getting solution.

1 Like

:wave: Hi to all and thanks to the CodinGame Team (maybe @CodinGame65 or @_CG_jupoulton / @_CG_SaiksyApo ?) for this ‘funny-falling’ Puzzle :wink: !
→ I wasn’t yet a CodinGamer in 2014 to participate to the original Challenge …
but thanks for the availability after the event, and still today :handshake: .

→ For those who tried and could not solve this one yet, i can say “maybe tomorrow:thinking:
:bulb: My tip is to get more experience with others Puzzles (easy or others medium), then try again …

:left_speech_bubble: My testimonial : after training on other similar puzzles, now i could solve it in a couple of hours :+1: .

Bye to all : have :sun_with_face: sun, :dark_sunglasses: fun and :keyboard: CodinGames :raised_hand: !

Interesting puzzle.

At first I thought this is a “maze” problem so I tried to “refine” the girds of map. For example, I converted the gird of type 4 into:

0100
1100
0011
0010

type_04
where 1 represents empty girds and 0 represents obstacles, so that I can use dfs to find the path from initial grid (X, Y) to target grid (H, EX).

However I found this may results to difficulty in path follow. Also I realized that the player cannot move left and right without a turning gird (like type 4, 5, 10…) So I simply follow the direction of tunnel and going down, and I succeeded.

well good for you,
in java i can’t even pass the “understanding where the room-types are” so…yeah, definitely hard for understanding their mumbo-jumbo.
tho i agree the logic is extremely simple.

So i guess (hard+simple)/2 = medium ? è_é

Hello,
After only running test 1. I have a timeout problem it’s while setting my map here’s the code I used do you have any solution
types = []
for i in range(h):
line = input() # represents a line in the grid and contains W integers. Each integer represents one room of a given type.
values = list(map(int, line.split()))
types.append(values)

Reset to the default code given to you, and compare that with your code. Make sure you don’t remove/incorrectly modify the lines which read the inputs.

Can you please tell me what the parsing problem was because I have the same issue

Have you tried what I mentioned earlier?

I didn’t delete the initial code I added up to it. If I delete my loop the conditions wouldn’t work.

yes the line gives me this output 0 3 0 which should give me 4 3

After further checking with you, the problem is not related to the input parsing code. The issues are, instead, wrongly swapping x and y indexes, and including extra “\n” in the output.

I took 1/2 hour to understand the puzzle and I still don’t understand it. Are we supposed to build a two dimensional array to get the map or if I simply don’t understand how the input work ?

You may read the statement for a description of the inputs, and leave the initial (default) code unchanged to see how to read the inputs. After that, it’s up to you to decide what additional code to write to store and process the inputs.