2401: Bronze Count

Memory Limit:128 MB Time Limit:1.000 S
Creator:
Submit:61 Solved:18

Description

After completing a competition, you are struck with curiosity. How many participants were awarded bronze level? Gold level is awarded to all participants who achieve the highest score. Silver level is awarded to all participants who achieve the second highest score. Bronze level is awarded to all participants who achieve the third highest score. Given a list of all the scores, your job is to determine the score required for bronze level and how many participants achieved this score.
在完成一场比赛后,你好奇有多少参赛者获得了铜牌级别。 金牌级别授予所有达到最高分的参赛者。银牌级别授予所有达到第二高分的参赛者。铜牌级别授予所有达到第三高分的参赛者。 给定所有分数的列表,你的任务是确定获得铜牌级别所需的分数以及有多少参赛者达到了这个分数。

Input

The first line of input contains a positive integer, N, representing the number of participants. 
Each of the next N lines of input contain a single integer representing a participant’s score. Each score is between 0 and 75 (inclusive) and there will be at least three distinct scores. 
The following table shows how the available 15 marks are distributed: 
输入的第一行包含一个正整数N,代表参赛者的数量。
接下来的N行输入包含一个单独的整数,代表一个参赛者的分数。 
每个分数都在0到75(包含)之间,并且至少会有三个不同的分数。

Output

Output a non-negative integer, S, and a positive integer, P, separated by a single space, where S is the score required for bronze level and P is how many participants achieved this score.
输出一个非负整数S和一个正整数P,中间用一个空格分开,其中S是获得铜牌级别所需的分数,P是达到这个分数的参赛者人数。

Sample Input

4 
70 
62 
58 
73

Sample Output

62 1

HINT

数据范围: N ≤ 250000

Source/Category