The Shortest Maze & Path
Statement
Goal
You got lost in a size 5x5 mini maze.The starting point is (1,1) and the goal is (3,3), always the same.
The outside of the maze is always a wall.
Please lead to the goal in the shortest distance.
The moving method is familiar
There is always one way to answer.
Input
Output
Line 1 : The shortest path.
ex. RRDD
ex. RRDD
Constraints
LINE length 5
Example
Input
##### #.### #.### #...# #####
Output
DDRR
Game modes
Fastest
Test cases
L Test
Input
#####
#.###
#.###
#...#
#####
Output
DDRR
Validator 1 Validator
Input
#####
#...#
###.#
###.#
#####
Output
RRDD
C Test
Input
#####
#...#
#.###
#...#
#####
Output
DDRR
Validator 2 Validator
Input
#####
#...#
###.#
#...#
#####
Output
RRDD
H Test
Input
#####
#.#.#
#...#
#.#.#
#####
Output
DRRD
Validator 3 Validator
Input
#####
#...#
##.##
#...#
#####
Output
RDDR
W Test
Input
#####
#.###
#..##
##..#
#####
Output
DRDR
Validator 4 Validator
Input
#####
#..##
##..#
###.#
#####
Output
RDRD
1 Test
Input
#####
#..##
##.##
#...#
#####
Output
RDDR
Validator 5 Validator
Input
#####
#...#
##.##
##..#
#####
Output
RDDR
Solution language
Solution
Stub generator input