Cow Steeplechase II Cross Product

Can someone please explain to me how the “cross product trick” worked in the solution for Cow Steeplechase II to detect intersected line segments? Thanks!

Check CPH and Intro to USACO.

1 Like