-
Notifications
You must be signed in to change notification settings - Fork 0
/
Template.java
56 lines (45 loc) · 1.12 KB
/
Template.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
44
45
46
47
48
49
50
51
52
53
54
55
56
import java.io.*;
import java.util.*;
import java.math.*;
import static java.lang.Math.*;
public class # {
public static void main(String[] args) {
new #().run();
}
private void solve() throws Exception {
}
private BufferedReader in;
private PrintWriter out;
private StringTokenizer tokenizer;
public void run() {
try {
in = new BufferedReader(new InputStreamReader(System.in));
tokenizer = null;
out = new PrintWriter(System.out);
solve();
in.close();
out.close();
} catch (Exception e) {
e.printStackTrace();
System.exit(1);
}
}
private int nextInt() throws IOException {
return Integer.parseInt(nextToken());
}
private long nextLong() throws IOException {
return Long.parseLong(nextToken());
}
private double nextDouble() throws IOException {
return Double.parseDouble(nextToken());
}
private String nextLine() throws IOException {
return new String(in.readLine());
}
private String nextToken() throws IOException {
while (tokenizer == null || !tokenizer.hasMoreTokens()) {
tokenizer = new StringTokenizer(in.readLine());
}
return tokenizer.nextToken();
}
}