Hide

Problem AH
Ferskasta Jarmið

Languages en is
/problems/ferskastajarmid/file/statement/en/img-0001.png
Image taken from deviantart.com

Bjarki worries a lot about his social media performance. He cares deeply about being hip and cool in the eyes of the current youth. After much research and extensive measurements, he has determined two main factors deciding how much attention a given meme will get on social media. Controversiality, how controversial the meme is, decides how many seconds the meme will stay in circulation on the users’ procedurally generated custom feeds. Coolness, how cool the meme is, will determine how much attention the meme gets per second. In total, this determines how fresh the meme is, that is to say how much attention it receives in total before being banished to the dark depths of the world wide web.

He has collected a shortlist of prospective memes he could put on his social media. Can you determine which of them is freshest so he chooses the correct meme?

Input

The first line of input contains a single integer $1 \leq n \leq 100$, the number of memes Bjarki put on the shortlist. The next $n$ lines contain one meme each. Each line contains the name of the meme, the controversiality and the coolness. The controversiality and coolness are integers from $0$ to $100$, both ends being inclusive. The name contains only English upper and lower case characters along with dots, underscores and digits. The names are of length at most $50$. No name will appear more than once.

Output

Print the name of the freshest meme. If many memes are equally fresh, print the one that comes first by alphabetical order.

Scoring

Group

Points

Constraints

1

50

No memes are equally fresh.

2

50

No further constraints.

Sample Input 1 Sample Output 1
10
leeroy_jenkins.avi 5 70
leek_spin.gif 60 40
chocolate_rain.mp3 30 45
caramelldansen.mp3 20 50
slender_man.exe 10 5
wojak.png 60 20
chuck_testa.mp4 10 55
gangnam_style.mp3 20 80
ayy_lmao.wav 0 10
fnaf.exe 30 35
leek_spin.gif
Sample Input 2 Sample Output 2
9
what_are_those.mp4 10 30
harambe.png 50 10
can_you_feel_my_heart.mp3 15 50
big_chungus.jpg 30 40
me_and_the_boys.jpeg 20 45
astronomia.flac 30 40
amogus.png 15 15
morbin_time.webp 40 30
skibidi_toilet.mkv 15 60
astronomia.flac

Please log in to submit a solution to this problem

Log in