Anders Kaseorg's submission of Intersecting Paths | CodeChef