Editorial for JDCC '16 Contest 1 P2 - Reddit at Work
Submitting an official solution before solving the problem yourself is a bannable offence.
One part of the problem is the input. By reading in hours and minutes, make a function that converts hours and minutes to minutes past 9:00. To output, hours is seconds divided by , and seconds is second . This makes the rest of the problem easier.
Store the latest ending time of a meeting so far (initialize to 9:00) and override as necessary. Keep a variable for the amount of wasted time (in seconds). If the current meeting's start time is after the latest ending time, then add the difference to the wasted time.