BFS, baby.
2 things got me.
* S position was not (0,0) in the puzzle input. Such embarrasment to
loose time over something so stupid.
* I asumed the elevation was fixed to to increase AND DECREASE by 1.
From the problem description:
> To avoid needing to get out your climbing gear, the elevation of the
> destination square can be at most one higher than the elevation of
> your current square; that is, if your current elevation is m, you
> could step to elevation n, but not to elevation o. _(This also means
> that the elevation of the destination square can be much lower than
> the elevation of your current square.)_
This means elevation only can _increase_ by one,
but _decrease_ with more.
So my wrong code:
0 <= abs(n - e) <= 1
got fixed with:
n - e <= 1
For pt 2, I reused the loop to find S to collect all "a" positions,
and looped them as starting points. Execution time is not the best,
but it works.