USACO 2018 December Contest, Platinum Problem 1. Balance Beam
In order to save money for a new stall in her barn, Bessie the cow has started performing in the local circus, demonstrating her remarkable sense of balance as she carefully walks back and forth on...