Learning Opportunities
This puzzle can be solved using the following concepts. Practice using these concepts and improve your skills.
Statement
Goal
M.A.R.I. is a Mobile Autonomous Robotic Intelligence who works in a factory.After a thunder storm, the factory has gone crazy and you need to help her fixing it, crossing the factory to the last room where the central command is.
Instructions
Here are M.A.R.I.’s instructions:
*
*
*
*
*
*
*
*
*
*
How to play
But M.A.R.I. is also a bit messed up.
You are given a list of instructions but you must play them one by one in a specific way.
When you use an instruction from the list, it’s popped out of the list and M.A.R.I. runs the complete set of instructions from the beginning of the set, not only the one you used.
An instruction can only be used once, or twice if it’s listed twice.
You can insert the new instruction wherever you want.
You might not use all the instructions.
The first instruction is already in the set but you must use a new instruction to move M.A.R.I.
If the instruction list begins with a space, no instruction is already in the set.
Example
The solution of the first room is
The instructions list is
First set, you play
Second set, you insert
Third set, finally you insert
Just write these six instructions, each set on a line.
The rooms
Each room is 5 squares wide and 7 squares high. M.A.R.I. must not step out of the room!
Here is the meaning of the squares:
*
*
*
*
*
*
*
*
Input
Line 1: The available instructions
Next 7 lines: The room
Next 7 lines: The room
Output
The instructions that bring M.A.R.I. to the exit, one line by set
Constraints
Each room has got only one solution if nop is used as the last instruction of a set.
Example
Input
p1 tr p2 ####2 ####. ####. ####. ####. ####. ##E..
Output
p2 p1 p2 p1 tr p2
A higher resolution is required to access the IDE