407122: GYM102697 093 Music Non Stop
Memory Limit:256 MB
Time Limit:1 S
Judge Style:Text Compare
Creator:
Submit:0
Solved:0
Description
093. Music Non Stoptime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard output
You're trying to find the longest possible piece of music, so that you can play music non-stop. Given a list of songs and their durations (in MM:SS, with leading zeros), figure out which song is the longest.
InputThe first line of input contains a positive integer $$$n$$$: the number of songs. The next $$$n$$$ lines contain a string, representing the song title, a space, and the song's duration, in MM:SS format with leading zeroes. (For example, a song that was 7 minutes and 9 seconds long would be written as 07:09).
OutputOutput a single string: the name of the longest song given in the input. If two songs have the same length, output the one that comes first in the input.
ExamplesInput6 TheRobots 06:13 Spacelab 05:57 Metropolis 06:01 TheModel 03:41 NeonLights 08:53 TheManMachine 05:32Output
NeonLightsInput
4 ReallyShortSong 01:30 ReallyLongSong 18:16 AnotherReallyLongSong 18:16 NotAsLongSong 11:01Output
ReallyLongSong