GO Solution For UVa 10500 - Robot maps. In this post we will see how we can solve this challenge in GoLang for UVa Online Judge.

Problem Description

The ACM factory produces and stores very dangerous products. This is why no human operator is allowed to enter the store room and only specialised robots can access the place to store new products or to retrieve them for their sell. The ACM factory is testing a movil robot which is able to build a p

...

You can find the full details of the problem Robot maps at UVa Online Judge

Sample Input

5 5
1 3
X X 0 0 X
X X 0 0 X
X 0 X 0 X
X 0 0 0 X
X X X X X
5 5
1 1
0 0 X X X
X X 0 0 X
X 0 0 0 X
X 0 0 0 X
X X X X X
0 0

Sample Output

|---|---|---|---|---|
|-?-|-X-|-0-|-0-|-X-|
|---|---|---|---|---|
|-?-|-X-|-0-|-0-|-X-|
|---|---|---|---|---|
|-X-|-0-|-X-|-0-|-X-|
|---|---|---|---|---|
|-X-|-0-|-0-|-0-|-X-|
|---|---|---|---|---|
|-?-|-X-|-X-|-X-|-?-|
|---|---|---|---|---|

NUMBER OF MOVEMENTS: 7

|---|---|---|---|---|
|-0-|-0-|-X-|-?-|-?-|
|---|---|---|---|---|
|-X-|-X-|-?-|-?-|-?-|
|---|---|---|---|---|
|-?-|-?-|-?-|-?-|-?-|
|---|---|---|---|---|
|-?-|-?-|-?-|-?-|-?-|
|---|---|---|---|---|
|-?-|-?-|-?-|-?-|-?-|
|---|---|---|---|---|

NUMBER OF MOVEMENTS: 1

Solution: Please check the main.go snippet for the solution.

Solution originally posted at: Github by @codingsince1985