728x90
import java.io.*;
import java.util.*;
public class Main {
static BufferedReader bf = new BufferedReader(new InputStreamReader(System.in)); //선언
public static void main(String[] args) throws IOException {
String n = bf.readLine();
int a = Integer.parseInt(n);
List<Integer> list = new ArrayList<>();
for (int i = 0; i < a; i++) {
String s = bf.readLine();
String[] parts = s.split(" ");
for (int j = 0; j < a; j++) {
list.add(Integer.parseInt(parts[j]));
}
}
list.sort(Integer::compareTo);
System.out.println(list.get(list.size()-a));
}
}
728x90
'알고리즘' 카테고리의 다른 글
백준 알고리즘 5347 (2) | 2024.03.29 |
---|---|
백준 알고리즘 2609 (1) | 2024.03.29 |
백준 알고리즘 9934 (0) | 2024.03.29 |
백준 알고리즘 2800 (0) | 2024.03.29 |
백준 알고리즘 10828 (0) | 2024.03.29 |