单点时限: 2.0 sec
内存限制: 256 MB
For this problem, you will write a program that prints the Nth 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 \leq P \leq 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.
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.
4 1 1 2 3 4 5 6 7 8 9 1000 2 338 304 619 95 343 496 489 116 98 127 3 931 240 986 894 826 640 965 833 136 138 4 940 955 364 188 133 254 501 122 768 408
1 8 2 489 3 931 4 768
题目 | 计分 |
---|---|
1001 | 100 |
1002 | 100 |
1003 | 100 |
1004 | 100 |
1005 | 100 |
1006 | 100 |
1007 | 100 |
1008 | 100 |
1009 | 100 |
1010 | 100 |
1011 | 100 |
1012 | 100 |
1013 | 100 |
1014 | 100 |
1015 | 100 |
1016 | 100 |
1017 | 100 |
1018 | 100 |
1019 | 100 |
1020 | 100 |
1021 | 100 |
1022 | 100 |
1023 | 100 |
1024 | 100 |
1025 | 100 |
1026 | 100 |
1027 | 100 |
1028 | 100 |
1029 | 100 |
1030 | 100 |