Pro.ID22774 TitleN-th Largest Value Title链接http://10.20.2.8/oj/exercise/problem?problem_id=22774 AC40 Submit65 Ratio61.54% 时间&空间限制描述For this problem, you will write a program that prints the N-th largest value in a fixed sized array of integers. To make things simple, N will be 3 and the array will always be have 10 decimal integer values. 输入The first line of input contains a single integer P, (1 ≤ P ≤ 1000), which is the number of data sets that follow. Each data set consists of a single line containing the data set number, followed by a space, followed by 10 space separated decimal integers whose values are between 1 and 1000 inclusive. 输出Description For this problem, you will write a program that prints the N-th largest value in a fixed sized array of integers. To make things simple, N will be 3 and the array will always be have 10 decimal integer values. Input The first line of input contains a single integer P, (1 ≤ P ≤ 1000), which is the number of data sets that follow. Each data set consists of a single line containing the data set number, followed by a space, followed by 10 space separated decimal integers whose values are between 1 and 1000 inclusive. Output For each data set, generate one line of output with the following values: The data set number as a decimal integer, a space, and the 3rd largest value of the corresponding 10 integers. Sample Input 4 Sample Output 1 8 Hint 请忽略本题。 Source 样例输入4 样例输出1 8 提示请忽略本题。 |