QOJ.ac

QOJ

Límite de tiempo: 1 s Límite de memoria: 512 MB Puntuación total: 100

#3326. 帮帮切尔西!

Estadísticas

当足球俱乐部成绩不佳时,只有一件事可做:买新球员!这是当今欧洲各大足球俱乐部最流行的策略,罗森博格(Rosenborg)就是挪威一家成功运用该策略的俱乐部。他们有许多球探在世界各地奔波,寻找有前途的年轻球员。

切尔西(Chelsea)目前在英超联赛中表现挣扎,他们决定再买一名球员。但他们厌倦了等待球探去寻找合适的球员,于是采用了一种更高效的策略。他们实际上将贝鲁姆(Bærum)的一句名言付诸实践:“如果某样东西在打折,你大可确信这背后是有原因的。”

在足球领域,这意味着最昂贵的球员通常就是最好的球员。因此,寻找新球员只需致电所有足球俱乐部,询问他们最昂贵的球员是谁。你的任务是帮助切尔西从名单中找出最昂贵的球员。

输入格式

输入包含 $n \le 100$ 组测试数据,其中 $n$ 由输入的第一行给出。每组测试数据的第一行是一个正整数 $p \le 100$,表示需要考虑的球员人数。接下来有 $p$ 行,每行代表一名球员。该行以一个正整数 $c_i < 2 \cdot 10^9$ 开头,表示球员 $i$ 的身价。随后是一个空格,紧接着是球员的姓名。所有球员的身价各不相同。球员姓名长度不超过 20 个字符,且不包含空格。

输出格式

对于每组测试数据,你的程序应输出一行,给出最昂贵球员的姓名。

样例

输入 1

2
3
10 Iversen
1000000 Nannskog
2000000 Ronaldinho
2
1000000 Maradona
999999 Batistuta

输出 1

Ronaldinho
Maradona

Discussions

About Discussions

The discussion section is only for posting: General Discussions (problem-solving strategies, alternative approaches), and Off-topic conversations.

This is NOT for reporting issues! If you want to report bugs or errors, please use the Issues section below.

Open Discussions 0
No discussions in this category.

Issues

About Issues

If you find any issues with the problem (statement, scoring, time/memory limits, test cases, etc.), you may submit an issue here. A problem moderator will review your issue.

Guidelines:

  1. This is not a place to publish discussions, editorials, or requests to debug your code. Issues are only visible to you and problem moderators.
  2. Do not submit duplicated issues.
  3. Issues must be filed in English or Chinese only.
Active Issues 0
No issues in this category.
Closed/Resolved Issues 0
No issues in this category.