Don't Panic - Episode 1 - Puzzle discussion


Feel free to send your feedback or ask some help here!

Don't Panic - Episode 1: the statement could be clearer!

Where is discussion ? smile
What techniques did you use for solving second part of the challenge?


A* Djikstra Technique wink


Do you mean to search minimal path from generator to the exit, where nodes of the graph are every possible position and elevators?


I used Dynamic Programming (DP) approach for this puzzle, smile

The DP returns the minimum number of steps to go finish the game. The states are the position of the clone, the floor of the clone, the direction of the clone, and the number of remaining elevator that can be build.


The second puzzle is much more interesting, this one is simple:
1) if HeadClone is in the wrong direction -> Block
2) profit

No need for fancy stuff


Yes, first part is very simple, I asked about the second.


what language have you used?


The input for elevators positions is wrong for test cases 5,6,7 in Level 1.


What makes you think that? Everything is fine for me confused


During my debug I print the elevators positions and found that it's correct in the first 4 test cases but wrong in the last 3.


I just checked all the test cases for the excercice and could not find anything wrong. Are you sure you're reading them correctly ?


These are the positions I print in all test cases:
(1) Correct
No Elevators
(2) Correct
(3) Correct
(4) For this case ran two times, the first failed but the second succeeded (no change in the code)
(5) Wrong
(6) Wrong
(7) Wrong


Elevators aren't given in the floor order so if you ignore the elevator floor information (read carefully the puzzle statement about initialization input), you'll obviously get bad results...

Here are an example of initialization input for test 5:

7 24 200 6 17 40 0 6
3 18
1 10
2 6
5 12
0 14
4 15

You can check these, there are all correct. The first line will always be the same, but the order of the next 6 will change.


Yes, you are right. Many thanks for your help smile.


Again smile, I passed all the test cases but got 85% as couldn't pass the first validation case.


wrong topic then smiley
The paranoid android one step further


Guuuuys!! You really shouldn't put such a simple puzzle into medium section =( After all that pain I've suffered in Mars Lander II this one is a child's play! It took about half an hour of my time. Two if's and two else's is all that is needed there.

Once you realize that 1) EVERY floor has either exit or elevator and 2) exit is ALWAYS on the highest floor, you pretty much solved it.


I think Mars Lander II is the one that is in the wrong place. I believe it could be a hard one. Medium ones include Indie level 1 and network cabling, which are also pretty easy


I read the problem carefully and I could not figure what happens when 2 clones going in 2 different directions move to the same position ?
PS: I didn't test because I want to code everything from the problem statement.