Jump to navigation
Jump to search
Instructions[edit]
Strategy[edit]
This year you get a fourth instruction: COPYFROM.
- COPYFROM
- This instruction is always accompanied by a number. The instruction tells the worker to walk over to the box on the floor labeled with the specified number, and copy the value that's placed in the box. Note that you cannot instruct the worker to COPYFROM a box that has no contents.
Apparently the IN conveyor is busted, and management is not interested in anything it contains. Instead, you have a set of six boxes on the floor, labeled 0 through 5. Your task is to place the letters of the word "BUG" on the OUT conveyor. To do this, you'll need to identify where on the floor those letter lie, and instruct the worker to gather them in the correct order. Your floor should look as follows:
U 0 | J 1 | X 2 |
G 3 | B 4 | E 5 |
Therefore, you need to write a program which grabs letters from boxes 4, 0, and 3, in that order:
COPYFROM 4 OUTBOX COPYFROM 0 OUTBOX COPYFROM 3 OUTBOX
Optimizing[edit]
It is not possible to further optimize this solution.
Performance[edit]
Steps Size Speed Goal 6 6 Reached 6 6