Ad
  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    If you take N and come back S same way back then E and come back W same way, you'll finish at the same point. But if you go N=6, W=8, S=3, E=1 you'll end not in 0,0 (start point) but at 3,7.
    Imagine labirynth, where corridors aren't the same length.

  • Custom User Avatar

    Element with higher position decides of position of pair.
    For example:
    for sum = 6 in [1, 3, 0, 4, 6, 3, 8] there are two pairs: 3, 3 (at pos. 1, 5) and 0, 6 (at 2, 4). (3,3) is at 5 and (0, 6) is at 4. So "entire pair (0, 6) is earlier".