CF74A.Room Leader
入门
通过率:0%
时间限制:2.00s
内存限制:256MB
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 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.
让我们回顾一下 Codeforces 的部分规则。以下规则经过简化,本题题面即为正式文档。
在比赛开始时,参赛者被分配到若干个房间中,每个房间恰好包含 n 名参赛者。比赛期间,参赛者需要解决五道题目:A、B、C、D 和 E。对于每道题目,参赛者根据其是否成功解决以及解出时间,获得相应分数。此外,参赛者还可对其他参赛者发起“hack”(攻击)。每次成功的 hack 可获得 100 分,每次失败的 hack 则扣除 50 分。每位参赛者的总分等于其所有题目得分与 hack 得分之和。
你需要确定某个房间中的“领先者”(leader);领先者即该房间中总分最高的参赛者。
输入格式
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).
第一行包含一个整数 n,表示该房间中的参赛者人数(1≤n≤50)。接下来的 n 行描述该房间的参赛者。第 i 行的格式为“_handle__i_ _plus__i_ _minus__i_ _a__i_ _b__i_ _c__i_ _d__i_ _e__i_”,分别表示某位参赛者的用户名、成功 hack 次数、失败 hack 次数,以及其在题目 A、B、C、D、E 上获得的分数。每位参赛者的用户名由拉丁字母、数字和下划线组成,长度为 1 至 20 个字符。各数值满足如下限制:
- 0≤_plus_i,_minus_i≤50;
- 若题目 A 未被解决,则 ai=0;否则 150≤ai≤500;
- 若题目 B 未被解决,则 bi=0;否则 300≤bi≤1000;
- 若题目 C 未被解决,则 ci=0;否则 450≤ci≤1500;
- 若题目 D 未被解决,则 di=0;否则 600≤di≤2000;
- 若题目 E 未被解决,则 ei=0;否则 750≤ei≤2500。
所有数值均为整数。所有参赛者的用户名互不相同。保证房间中恰好有一名领先者(即不存在两名参赛者拥有相同的最高总分)。
输出格式
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 — 3860
- tourist — 4140
- Egor — 4030
- c00lH4x0R — - 350
- some_participant — 2220
Thus, the leader of the room is tourist.
每位参赛者在示例中获得的分数如下:
- Petr — 3860
- tourist — 4140
- Egor — 4030
- c00lH4x0R — - 350
- some_participant — 2220
因此,该房间的领先者是 tourist。
输入解题思路,AI测评打分。不知道怎么写?