I really love watching television. If it were possible, I would watch for 24 hours per day! I'm particularly fond of programs that are broadcast at the same time every day (such as the news, sports and series). Going through the TV guide I selected all the programs that are worth watching.
Each element of programs describes a TV program I'd like to watch. An element is formatted as follows: "begintime - endtime" (quotes for clarity), where begintime and endtime are times in 12 hour notation. A valid time in 12 hour notation looks like "hh:mmXX", where hh contains exactly two digits and 01<=hh<=12, mm contains exactly two digits and 00<=mm<=59, and XX is either AM or PM. Programs with a later begintime than endtime wrap around the clock to the next day. If begintime and endtime are equal, the program lasts for 24 hours.
I don't want to see parts of TV programs; I either want to see the whole program or none of it. What is the maximum number of minutes that I can spend per day watching my favorite programs?