UVa 10021

From Algorithmist
Jump to: navigation, search

10021 - Cube in the labirint[edit]

http://uva.onlinejudge.org/external/100/10021.html

Summary[edit]

BFS

Explanation[edit]

Each state records the location of the cube and the direction of the side of the cube. Then do a breadth first search.

Input[edit]

1

10 2
1 1
10 1
v
2 1
6 2
h
4 1

Output[edit]

11