acmsguru |
---|
Закончено |
#" character represents an impassable wall. "
@" character represents sokoban itself, "
"representsacellinwhichtheboxisinitiallylocated, and"."representsacellwheresokobanshouldputthebox.Cellsinwhichsokoban, boxanddestinationcellareinitiallylocatedarepassable.Inputfilewillcontaineveryofthecharacters"@", "" and "
." exactly once. Maze will be closed in a sense that sokoban will be unable to leave it.
Impossible.". Otherwise write one of the best (in the abovementioned sense) solutions. Each move is represented by one of the four characters: "
u" means moving up, "
r" — right, "
d" — down and "
l" — left. Use capital letters (i.e. "
U", "
R", "
D" and "
L") to represent moves when sokoban pushes the box.
sample input | sample output |
####
# ##
#@ #
#.# #
# #
#####
|
sampleinput
sampleoutput
#### # ## #@ # #.# # # # # #####
Impossible.
Название |
---|