-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtemplate.java
More file actions
48 lines (40 loc) · 1.07 KB
/
Copy pathtemplate.java
File metadata and controls
48 lines (40 loc) · 1.07 KB
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
import java.util.*;
import java.io.*;
public class Main {
MyScanner sc;
PrintWriter out;
int min(int a, int b) {
return a < b ? a : b;
}
int max(int a, int b) {
return a > b ? a : b;
}
void sol() {
sc = new MyScanner();
out = new PrintWriter(new BufferedOutputStream(System.out));
out.close();
}
public static void main(String args[]) {
new Main().sol();
}
class MyScanner {
BufferedReader br;
StringTokenizer st;
public MyScanner() {
br = new BufferedReader(new InputStreamReader(System.in));
}
String next() {
while (st == null || !st.hasMoreElements()) {
try {
st = new StringTokenizer(br.readLine());
} catch (IOException e) {
e.printStackTrace();
}
}
return st.nextToken();
}
}
int ni() {
return Integer.parseInt(sc.next());
}
}