Bronze Count
InterviewTime limit1sMemory limit1024 MB
Given N participant scores, find the third-highest distinct score and how many participants received that score.
- Level
Easy2 of 10
- Topics
- Sorting, Implementation
- Solved
- No attempts yet
Problem
After a competition, you are curious how many participants were awarded bronze. Gold goes to every participant with the highest score. Silver goes to every participant with the second highest score. Bronze goes to every participant with the third highest score.
Given the list of all scores, find the score required for bronze and the number of participants who achieved that score.

Input
The first line contains a positive integer N, the number of participants. Each of the next N lines contains one participant's score, an integer from 0 to 75 inclusive. There are at least three distinct scores.
Output
Print a non-negative integer S and a positive integer P, separated by a single space. S is the score required for bronze, and P is the number of participants who achieved that score.