Guest User

Untitled

a guest
Aug 22nd, 2020
175
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. If you consider the grid as a chequerboard of dark and light squares, then at each step, a snake must move from one colour to the opposite colour.
  2.  
  3. Since the start and end points of the snake are on opposite chequerboard colours, any valid snake thus must have even length. Consider this, to better understand the possible values of the snake head and tail.
Add Comment
Please, Sign In to add comment