#E. B - Do you know the second highest mountain?

    传统题 1000ms 256MiB

B - Do you know the second highest mountain?

该比赛已结束,您无法在比赛模式下递交该题目。您可以点击“在题库中打开”以普通模式查看和递交本题。

B - Do you know the second highest mountain?

Score : $200$ points

Problem Statement

The Republic of AtCoder has $N$ mountains. The $i$-th mountain has a name $S_i$ and a height of $T_i$.

Return the name of the second highest mountain there. It is guaranteed that all the mountains have different names and different heights.

Constraints

  • $2 \leq N \leq 1000$
  • $1 \leq ({}$the length of $S_i) \leq 15$
  • $1 \leq T_i \leq 10^5$
  • $S_i \neq S_j \ (i \neq j)$
  • $T_i \neq T_j \ (i \neq j)$
  • $S_i$ consists of uppercase English letters, lowercase English letters, and digits.
  • $N$ and $T_i$ are integers.

Input

Input is given from Standard Input in the following format:

NN

S1S_1 T1T_1

S2S_2 T2T_2

\vdots

SNS_N TNT_N

Output

Print the name of the second highest mountain.


3
Everest 8849
K2 8611
Kangchenjunga 8586
K2

The second highest mountain in the world is K2.


4
Kita 3193
Aino 3189
Fuji 3776
Okuhotaka 3190
Kita

The second highest mountain in Japan is Kita-dake.


4
QCFium 2846
chokudai 2992
kyoprofriends 2432
penguinman 2390
QCFium

2025寒假ATC码力训练营第十三次练习

未参加
状态
已结束
规则
IOI
题目
6
开始于
2025-2-6 13:00
结束于
2025-2-6 14:30
持续时间
1.5 小时
主持人
参赛人数
6