Anders Kaseorg's submission of Snake and Apple Tree | CodeChef