2017 Canadian Computing Olympiad Day 2 Mirror

This will be a mirror of the 2017 Canadian Computing Olympiad (CCO 2017), the contest primarily used to select Canada's IOI team. There are 2 separate contests, Day 1 and Day 2. Scoring will follow IOI format with full feedback and partial points but each task will be worth 25 points. For each day, you will be given 4 hours to solve 3 problems. Each day can be started at any time during the contest window.