As the expression goes, bad things come in threes. Detective Pikaptcha was not expecting to reach a third level of space-warping before being able to escape. This maze looks like it's being bent around the surface of a cube.
“Again, the wall-following method should work.”Your objective is to write a program that will compute, for each cell of a maze, the number of times Pikaptcha will step into the cell by following a wall until he reaches his original location.
The cube is given to you, one face after the other as 6 grids filled with
The faces are given in that order and orientation.
>: facing right
v: facing down
<: facing left
^: facing up
Rfor the wall on his right
Lfor the wall on his left
We’re considering the
Pikaptcha can step over the edge of a face and continue his wall-following path on another face of the cube. For Pikaptcha to be able to step over the edge, the two cells touching that part of the edge should be passable.You must analyze the given maze and return it with a small transformation: for each empty cell, instead of a
Allotted response time to output is ≤
A higher resolution is required to access the IDE