-
Notifications
You must be signed in to change notification settings - Fork 0
/
BOJ_23334.java
29 lines (26 loc) · 1023 Bytes
/
BOJ_23334.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
public class Main {
static BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
private void solution() throws Exception {
int n = Integer.parseInt(br.readLine());
String answer = "";
int max = 0;
for (int i = 0; i < n; i++) {
StringTokenizer st = new StringTokenizer(br.readLine());
int cur = Integer.parseInt(st.nextToken()) * 1000000 + Integer.parseInt(st.nextToken()) * 1000 + Integer.parseInt(st.nextToken());
if (cur > max) {
max = cur;
StringBuilder sb = new StringBuilder();
while (st.hasMoreTokens())
sb.append(st.nextToken()).append(' ');
answer = sb.toString();
}
}
System.out.println(answer);
}
public static void main(String[] args) throws Exception {
new Main().solution();
}
}