{"raw_statement":[{"iden":"statement","content":"Music Non Stop\n\nYou'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.\n\nThe 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).\n\nOutput 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.\n\n"},{"iden":"input","content":"The 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)."},{"iden":"output","content":"Output 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."},{"iden":"examples","content":"Input6\nTheRobots 06:13\nSpacelab 05:57\nMetropolis 06:01\nTheModel 03:41\nNeonLights 08:53\nTheManMachine 05:32\nOutputNeonLights\nInput4\nReallyShortSong 01:30\nReallyLongSong 18:16\nAnotherReallyLongSong 18:16\nNotAsLongSong 11:01\nOutputReallyLongSong\n"}],"translated_statement":null,"sample_group":[],"show_order":[],"formal_statement":"**Definitions**  \nLet $ n \\in \\mathbb{Z}^+ $ be the number of songs.  \nLet $ S = \\{(t_i, d_i) \\mid i \\in \\{1, \\dots, n\\}\\} $ be the set of song entries, where:  \n- $ t_i \\in \\mathbb{S} $ is the song title (string),  \n- $ d_i \\in \\mathbb{S} $ is the duration in MM:SS format.  \n\nDefine the function $ f: \\mathbb{S} \\to \\mathbb{Z} $ that converts MM:SS to total seconds:  \n$$ f(\\text{MM:SS}) = 60 \\cdot \\text{MM} + \\text{SS} $$  \nwhere MM and SS are the integer values of the minute and second parts.\n\n**Constraints**  \n1. $ 1 \\leq n \\leq 100 $ (implicit from context)  \n2. Each $ d_i $ is a string of the form \"MM:SS\" with $ 00 \\leq \\text{MM} \\leq 99 $, $ 00 \\leq \\text{SS} \\leq 59 $  \n\n**Objective**  \nFind the song $ (t_j, d_j) \\in S $ such that:  \n$$ j = \\min\\left\\{ i \\in \\{1, \\dots, n\\} \\mid f(d_i) = \\max_{1 \\leq k \\leq n} f(d_k) \\right\\} $$  \nOutput $ t_j $.","simple_statement":"Find the longest song by duration. Input has n songs, each with a title and time in MM:SS. Output the title of the longest song. If tied, pick the first one.","has_page_source":false}