Don't Panic - Episode 1 - Puzzle discussion

They just continue their way without changing direction. Only blocked clones matter.

2 Likes

So, they can occupy the same positionā€¦ I guess Iā€™ve got to start again :wink:

1 Like

Itā€™s easier than you think, just donā€™t bother about the other clone, focus on the lead clone and consider it like a wall once it is blocked

1 Like

Maybe so =)

I had the same problem with the order of the elevators, can you explain how you fixed the order, because I keep getting an ā€œout-of-bounds errorā€

With which language? Often that means that if you have a tab[5] you try to access tab[6] for example.

My solution doesnā€™t pass u-turn validation test, but it passes all regular tests. Is that possible?

3 Likes

Yes the same for meā€¦
Leading clone stops juste before the laser wall, but after that, validator says I loose.
Iā€™m scratching my head to find out where is the flaw in my code, but I donā€™t see whyā€¦

You must use an optimised algorithm to do the less step possible, because there are a limited amount of turn you can do.

Have you tried the suggestions explained above?

To me it looks like the test is bugged. Anyone else is having the same issue?

Nope, i relaunched my code, it seems fine, explain your problems in details.

Contrary to the test on the editor, the validation test has the exit point at step 11, being 12 the last place where one can block the leading android. Therefore, when that happens, I lose just because the other androids do not have space to come out. Please let me know if that could be because the validation tests are not the same for everyone or how to solve this issue.

1 Like

Not sure I understood correctly your issue, but you can do a block on the starting point and following androids will go in the other direction. The same applies if you put a block on a lift exit.

As @CvxFous I launched my code again and got 100% so the validation seems fine.

Thanks for your input @NewboO and @CvxFous. I have been able to get a 100% after fixing my code, due to an issue that only happened on the validation case. I stand my point though that U Turn is different in the editor testing than in validation :smile:

2 Likes

I do not understand how is elevatorFloor, elevatorPos read - as far as I can see it defines one variable repeatedly. So in theory, as far as I can see, the initialisation procedure only stores the ā€œlastā€ elevatorFloor, elevatorPos read. If that is not the case, I still do not understand how to access the ā€œotherā€ elevatorPosā€™es (trying to access something like elevatorPos[i] returns an error, as elevatorPos is an integer, not an array).

I am aware that this is a very basic problem, but I would be very grateful if someone could help out. Iā€™m using Python, if that changes anything - I wasnā€™t changing the initialisation procedures at all.

1 Like

@emcid What about store the elevatorPos in your own dictonnary [elevatoorFloor:elevatorPos]

They should specify in the instructions that the elevators are intentionally placed out of order.
It was confusing, as I had assumed that it was in order, and the first four levels did have elevators in order.

1 Like

Well, it would really be confusing if all test levels had elevators in order. If you make an assumption beyond what is written in the problem statement, your code should at the very least check itā€¦ :wink:

Hi, i try to solve this in c++, but i always get this error: ā€œ'elevatorFloorā€™ was not declared in this scopeā€, and the same with ā€˜elevatorPosā€™. When i try to replace inicialization before the ā€˜forā€™ loop, the value of elevatorFloor is 4197072, so itā€™s incorectly loaded. Sombody have the same problem?

Hi, I have a problem: i pass all tests except ā€œ6 floors, lot of roundsā€, when I run that test it seems bugged, all the others tests works great. Someone else has this problem? Could be a bug? I code in Java. Thanks

3 Likes