407951: GYM102948 A Spiciest Snek

Memory Limit:256 MB Time Limit:1 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

A. Spiciest Snektime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard output

Sneks are nifty creatures, equipped with all manner of defense mechanisms. From camouflaging vipers to striking cobras to wood snakes that shoot blood from their eyes, sneks can really live up to their alternative title as "danger noodles."

One of the most powerful deterrents and methods of subduing prey for many snakes is the venom injected out of their fangs when biting, but the strength of snake venom varies greatly depending on species. Given a list of venomous snake species and the median amount of venom required to be deadly, determine which snek must be the spiciest!

Input

The first line of input contains a single integer $$$N$$$ ($$$1 \leq N \leq 10^5$$$), denoting the number of snake species to follow. Each of the next $$$N$$$ lines contains the spaceless name of a snake species followed by the decimal value of the MLD (median lethal dose) in mg/kg for that snake's venom ($$$0.0 \leq MLD \leq 10.0$$$).

Output

Output the species name of the deadliest snek, indicated by the smallest MLD value.

You are guaranteed that there will be no ties and no two MLD values within $$$10^{-5}$$$ of one another.

ExampleInput
8
black_mamba 0.28
coastal_taipan 0.106
indian_cobra 0.80
common_krait 0.365
eastern_brown_snake 0.03
russells_viper 0.162
king_cobra 1.09
common_death_adder 0.4
Output
eastern_brown_snake

加入题单

算法标签: