-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path2693.java
More file actions
24 lines (21 loc) · 806 Bytes
/
2693.java
File metadata and controls
24 lines (21 loc) · 806 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.*;
public class Main {
public static void main(String[] args) throws Exception {
BufferedReader bf = new BufferedReader(new InputStreamReader(System.in));
int T = Integer.parseInt(bf.readLine());
StringBuilder sb = new StringBuilder();
for(int i=0; i<T; i++){
List<Integer> list = new ArrayList<>();
StringTokenizer st = new StringTokenizer(bf.readLine()," ");
for(int j=0; j<10; j++){
list.add(Integer.parseInt(st.nextToken()));
}
Collections.sort(list,Comparator.reverseOrder());
sb.append(list.get(2));
sb.append('\n');
}
System.out.println(sb);
}
}