-
Notifications
You must be signed in to change notification settings - Fork 36
/
Copy pathMain.java
43 lines (36 loc) · 1.11 KB
/
Main.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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
import java.io.*;
import java.util.*;
public class Solution {
public static void main(String[] args) {
new Solution().run();
}
public void run() {
InputReader reader = new InputReader(System.in);
PrintWriter writer = new PrintWriter(System.out);
try {
} catch (IOException e) {
} finally {
writer.close();
}
}
class InputReader {
InputReader(InputStream in) {
this.reader = new BufferedReader(new InputStreamReader(in));
this.tokenizer = new StringTokenizer("");
}
public String nextToken() throws IOException {
while (!tokenizer.hasMoreTokens()) {
tokenizer = new StringTokenizer(reader.readLine());
}
return tokenizer.nextToken();
}
public int nextInt() throws IOException {
return Integer.parseInt(nextToken());
}
private BufferedReader reader;
private StringTokenizer tokenizer;
}
private void debug(Object...o) {
System.err.println(Arrays.deepToString(o));
}
}