#abc365b. B - Second Best
B - Second Best
Score : points
问题陈述
给定一个长度为 的整数序列 。这里, 都是不同的。
在 中哪个元素是第二大的?
以上为大语言模型 kimi 翻译,仅供参考。
Problem Statement
You are given an integer sequence of length . Here, are all distinct.
Which element in is the second largest?
Constraints
- are all distinct.
- All input values are integers.
Input
The input is given from Standard Input in the following format:
Output
Print the integer such that the -th element in is the second largest.
Sample Input 1
4
8 2 5 1
Sample Output 1
3
The second largest element in is , so print .
Sample Input 2
8
1 2 3 4 5 10 9 11
Sample Output 2
6