Editorial for LCC '22 Contest 2 S1 - Skipper's Nut Hunt

Remember to use this editorial only when stuck, and not to copy-paste code from it. Please be respectful to the problem author and editorialist.

Submitting an official solution before solving the problem yourself is a bannable offence.

Author: Trent

Start at R, and continually simulate Skipper's movements, keeping track of the number of nodes he's been to. Also keep a visited array of which nodes you have been to - if at any point you find yourself at a node you've been at before, you know that you have collected all of the nuts on the path and your future movements are going to be the exact same.


There are no comments at the moment.