#ABC476C. 第三大的数 / Third Largest Number
第三大的数 / Third Largest Number
Problem Statement
You are given an integer not less than and a length- sequence of positive integers .
For each , solve the following problem:
- When are sorted in descending order, find the third value from the front.
Constraints
- All input values are integers.
Input
The input is given from Standard Input in the following format:
Output
Output lines.
The -th line should contain the answer for .
5
1 2 1 2 3
1
1
2
- For : sorting in descending order gives . The third value from the front is , so output on the first line.
- For : sorting in descending order gives . The third value from the front is , so output on the second line.
- For : sorting in descending order gives . The third value from the front is , so output on the third line.
10
1 1 1 3 2 5 4 3 6 5
1
1
1
2
3
3
4
5
10
11 9 1 3 17 19 10 19 17 3
1
3
9
11
11
17
17
17
- Source: AtCoder ABC 476 C
相关
在下列比赛中: