I recently attempted USACO Silver 2018 January - Lifeguards:
I’m confused regarding the method used to solve this problem from USACO guide:
I understand that they take the time intervals and sort it by starting time. Then they loop through it and determine how much time the guards all combined cover. So that is the code from 0-36. I’m a little confused what they do from lines 38-51. Can someone please explain that.