Codeforces Beta Round 68
A
Room Leader
Codeforces
1000
原题
←B →
翻译中…

Let us remind you part of the rules of Codeforces. The given rules slightly simplified, use the problem statement as a formal document.

翻译中…

In the beginning of the round the contestants are divided into rooms. Each room contains exactly $*n*$ participants. During the contest the participants are suggested to solve five problems, $*A*$, $*B*$, $*C*$, $*D*$ and $*E*$. For each of these problem, depending on when the given problem was solved and whether it was solved at all, the participants receive some points. Besides, a contestant can perform hacks on other contestants. For each successful hack a contestant earns $100$ points, for each unsuccessful hack a contestant loses $50$ points. The number of points for every contestant is represented by the sum of points he has received from all his problems, including hacks.

翻译中…

You are suggested to determine the leader for some room; the leader is a participant who has maximum points.

翻译中…

Input

翻译中…

The first line contains an integer $*n*$, which is the number of contestants in the room ($1 ≤ *n* ≤ 50$). The next $*n*$ lines contain the participants of a given room. The $*i*$-th line has the format of "$*handle*_{*i*}$ $*plus*_{*i*}$ $*minus*_{*i*}$ $*a*_{*i*}$ $*b*_{*i*}$ $*c*_{*i*}$ $*d*_{*i*}$ $*e*_{*i*}$" — it is the handle of a contestant, the number of successful hacks, the number of unsuccessful hacks and the number of points he has received from problems $*A*$, $*B*$, $*C*$, $*D*$, $*E*$ correspondingly. The handle of each participant consists of Latin letters, digits and underscores and has the length from $1$ to $20$ characters. There are the following limitations imposed upon the numbers:

翻译中…
  • $0 ≤ *plus*_{*i*}, *minus*_{*i*} ≤ 50$;
  • $150 ≤ *a*_{*i*} ≤ 500$ or $*a*_{*i*} = 0$, if problem $*A*$ is not solved;
  • $300 ≤ *b*_{*i*} ≤ 1000$ or $*b*_{*i*} = 0$, if problem $*B*$ is not solved;
  • $450 ≤ *c*_{*i*} ≤ 1500$ or $*c*_{*i*} = 0$, if problem $*C*$ is not solved;
  • $600 ≤ *d*_{*i*} ≤ 2000$ or $*d*_{*i*} = 0$, if problem $*D*$ is not solved;
  • $750 ≤ *e*_{*i*} ≤ 2500$ or $*e*_{*i*} = 0$, if problem $*E*$ is not solved.
翻译中…

All the numbers are integer. All the participants have different handles. It is guaranteed that there is exactly one leader in the room (i.e. there are no two participants with the maximal number of points).

翻译中…

Output

翻译中…

Print on the single line the handle of the room leader.

翻译中…

Note

翻译中…

The number of points that each participant from the example earns, are as follows:

翻译中…
  • Petr — $3860$
  • tourist — $4140$
  • Egor — $4030$
  • c00lH4x0R — $- 350$
  • some_participant — $2220$
翻译中…

Thus, the leader of the room is tourist.

翻译中…

样例

Input #1
5
Petr 3 1 490 920 1000 1200 0
tourist 2 0 490 950 1100 1400 0
Egor 7 0 480 900 950 0 1000
c00lH4x0R 0 10 150 0 0 0 0
some_participant 2 1 450 720 900 0 0
Output #1
tourist
InputCopy OutputCopy
题目信息
题号
74A
时间限制
2 s
内存限制
256 MB
标签
模拟

题面与样例版权归 Codeforces 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。