Find all the paths that a tortoise can travel from an initial position to a final position. The ground has paving stones, each one with a letter painted on it. The tortoise can only make horizontal and vertical movements, and it cannot pass by the same position twice.
Input begins with and , followed by lines with letters each. Follow a pair of natural numbers indicating the initial row and column, and a pair of naturals numbers indicating the final row and column. The upper-left corner corresponds to the position .
Print all the paths from the initial position to the final position.
You can print the solutions to this exercise in any order.
Author: Unknown
Translator: Carlos Molina
Generation: 2026-01-25T10:14:03.713Z
© Jutge.org, 2006–2026.
https://jutge.org