• 23

## Learning Opportunities

This puzzle can be solved using the following concepts. Practice using these concepts and improve your skills.

## Goal

A maze robot, BillyBot, is going to take the sky maze challenge.

Your goal given the maze of w by h and a destination point (dx, dy), help BillyBot to reach the destination without repeating the same route.

The maze, with the top left corner being (0, 0), consists characters 1 and 0 where 0 is a walkable path, and 1 is an empty space.

For example: Given the 5 by 3 maze:
01111
00000
11110

And you are given a destination of (4, 2), reaching it from starting point (0, 0) would be:
-> DOWN
-> RIGHT
-> RIGHT
-> RIGHT
-> RIGHT
-> DOWN
Initialization input
Line 1: 2 space-separated integers w and h, width and height of the maze.
Line 2: 2 space-separated integers dx and dy, destination x and y.
Next h lines: A string of characters either a 1 or a 0.
Input for a game round
2 space separated integers x and y, the position of the player.
Output
Actions: UP, DOWN, LEFT, RIGHT, changing the width and height of the player acordingly. All outputs must be capital.
Constraints
1<=w,h,dx,dy,x,y<50

A higher resolution is required to access the IDE