I wasn't reading well the input, for example:
Code: Select all
3
A
BCD
E G
ABE
Moderator: Board moderators
Code: Select all
2
BB
DD
BB
Code: Select all
(1,1) - E
(1,2) - W
Code: Select all
(1,1) - E
Code: Select all
3
A
BCD
E G
ABE
Code: Select all
ABE
not found
Code: Select all
ABE
(1,1) - S
causes a lot of confusion.lines N+2 through end of file
Code: Select all
2
3
A
BCD
E G
ABE
4
LOST
I N
SP A
C E
ANT
LOT
S
PT
Code: Select all
ABE
not found
ANT
(3,4) - N
LOT
not found
S
(1,3) - N
(1,3) - NE
(1,3) - E
(1,3) - SE
(1,3) - S
(1,3) - SW
(1,3) - W
(1,3) - NW
(3,1) - N
(3,1) - NE
(3,1) - E
(3,1) - SE
(3,1) - S
(3,1) - SW
(3,1) - W
(3,1) - NW
PT
(3,2) - NE