CF74A.Room Leader

普及/提高-

通过率:0%

AC君温馨提醒

该题目为【codeforces】题库的题目,您提交的代码将被提交至codeforces进行远程评测,并由ACGO抓取测评结果后进行展示。由于远程测评的测评机由其他平台提供,我们无法保证该服务的稳定性,若提交后无反应,请等待一段时间后再进行重试。

题目描述

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 nn participants. During the contest the participants are suggested to solve five problems, AA , BB , CC , DD and EE . 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 100100 points, for each unsuccessful hack a contestant loses 5050 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.

输入格式

The first line contains an integer nn , which is the number of contestants in the room ( 1<=n<=501<=n<=50 ). The next nn lines contain the participants of a given room. The ii -th line has the format of " handleihandle_{i} plusiplus_{i} minusiminus_{i} aia_{i} bib_{i} cic_{i} did_{i} eie_{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 AA , BB , CC , DD , EE correspondingly. The handle of each participant consists of Latin letters, digits and underscores and has the length from 11 to 2020 characters. There are the following limitations imposed upon the numbers:

  • 0<=plusi,minusi<=500<=plus_{i},minus_{i}<=50 ;
  • 150<=ai<=500150<=a_{i}<=500 or ai=0a_{i}=0 , if problem AA is not solved;
  • 300<=bi<=1000300<=b_{i}<=1000 or bi=0b_{i}=0 , if problem BB is not solved;
  • 450<=ci<=1500450<=c_{i}<=1500 or ci=0c_{i}=0 , if problem CC is not solved;
  • 600<=di<=2000600<=d_{i}<=2000 or di=0d_{i}=0 , if problem DD is not solved;
  • 750<=ei<=2500750<=e_{i}<=2500 or ei=0e_{i}=0 , if problem EE 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).

输出格式

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

输入输出样例

  • 输入#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
    

    输出#1

    tourist

说明/提示

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

  • Petr — 38603860
  • tourist — 41404140
  • Egor — 40304030
  • c00lH4x0R — 350-350
  • some_participant — 22202220

Thus, the leader of the room is tourist.

首页