-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTemplate.java
More file actions
61 lines (50 loc) · 2.18 KB
/
Template.java
File metadata and controls
61 lines (50 loc) · 2.18 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
49
50
51
52
53
54
55
56
57
58
59
60
61
import java.io.*;
import java.util.*;
public class Main {
// ── Constants ───────────────────────────────────────────────
static final boolean DEBUG = System.getProperty("cicada") != null;
static final long INF = (long) 2e18;
static final long MOD = (long) 1e9 + 7;
// ── Fast I/O ─────────────────────────────────────────────────
static BufferedReader br = new BufferedReader(
new InputStreamReader(System.in)
);
static PrintWriter out = new PrintWriter(
new BufferedWriter(new OutputStreamWriter(System.out))
);
static StringTokenizer st;
static String nextToken() throws IOException {
while (st == null || !st.hasMoreTokens()) st = new StringTokenizer(
br.readLine()
);
return st.nextToken();
}
static int nextInt() throws IOException {
return Integer.parseInt(nextToken());
}
static long nextLong() throws IOException {
return Long.parseLong(nextToken());
}
static double nextDouble() throws IOException {
return Double.parseDouble(nextToken());
}
static String nextLine() throws IOException {
return br.readLine();
}
// ── Debug (goes to stderr, never affects output) ──────────────
static void debug(Object... args) {
if (DEBUG) System.err.println(Arrays.deepToString(args));
}
// ── Solve ─────────────────────────────────────────────────────
static void solve() throws IOException {
// your logic here
}
// ── Main ──────────────────────────────────────────────────────
public static void main(String[] args) throws IOException {
int t = nextInt();
while (t-- > 0) {
solve();
}
out.flush();
}
}