1 Problem description
This a story about an old robot named Tron, a garbage collector. Tron can work in environments that have empty navigable spaces in between, separated by obstacles (walls, etc.). Tron has a built-in stack-based algorithm using which it can find its way to exit starting from a certain start location. For the sake of simplicity, we assume that the environment has exactly one exit. For cleaning purposes, Tron is airdropped to a certain empty location in the environment. Its job is to clean garbage on the way to exit. In our case, the environments are just m×n rectangular grids. Assume that m, n ≥ 1. This means an environment has m rows and n columns. The rows are numbered from 0 to m − 1 and the columns from 0 to n−1. In our figures, the top row is numbered 0 and the left column is numbered 0. Except for the start and the end grid cells, every grid cell is either empty or has an obstacle in it.
Sun | Mon | Tue | Wed | Thu | Fri | Sat |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | 7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 | 30 | 1 | 2 | 3 | 4 | 5 |