LCC/Moose '20 Contest 3 J3 - One-Trick Pony
View as PDF is playing her favourite champion, Zog! However, because is a one-trick, she is easily countered by her opponents with certain champions. Thankfully, is allowed to ban 1 opposing champion to maximize her own chance of winning. can check the most current statistics for the champions in the game. She can see the relative winrate
of Zog against champion
, and its relative pickrate
.
More formally, a champion with a winrate is
times more likely to lose to Zog than a champion with winrate
, and a champion with a pickrate
is
times more likely to be chosen than a champion with pickrate
.
Can you help maximize her chance to win?
Input Specification
The first line contains , the number of bannable champions.
The next lines contain a string and 2 integers
,
, and
, the name, winrate, and pickrate of champion
.
It is guaranteed that every champion has a unique name of lowercase letters, that , and that
for all
.
Output Specification
Print the name of the champion that should ban. If there are multiple, print the champion with the smallest
. Note that 64-bit integers may be required to pass.
Subtasks
Subtask 1 [30%]
Subtask 2 [70%]
No further constraints.
Sample Input
6
n 50 10
i 30 20
c 60 40
o 10 5
l 15 10
e 70 15
Sample Output
i
Comments