*Third maximum
Problem
Given N integers. Find the third largest maximum element of the sequence (the element that would stand third if the input data were sorted non-decreasing)
Input:
the first line sets the number N(
\(3<=N<=10^5\))
then there are N lines, one number in each line
Output:
print the third maximum element
Examples
№ |
Input |
Output |
1 |
7
10
15
35
35
14
35
10 |
35 |
2 |
5
10
5
7
11
9 |
9 |
Запрещенные операторы: max
; min
; [
; sort