Skip to content

Instantly share code, notes, and snippets.

@jdabtieu
Last active January 23, 2023 21:42
Show Gist options
  • Save jdabtieu/0d698d2035bd1024d0c791588668e787 to your computer and use it in GitHub Desktop.
Save jdabtieu/0d698d2035bd1024d0c791588668e787 to your computer and use it in GitHub Desktop.
Java Competitive Programming template with fast IO
import java.io.*;
import java.util.*;
public class Main {
static BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
static StringTokenizer in;
public static void main(String[] args) throws IOException {
}
static String next() throws IOException {
while (in == null || !in.hasMoreTokens())
in = new StringTokenizer(br.readLine());
return in.nextToken();
}
static long readLong() throws IOException {
return Long.parseLong(next());
}
static int readInt() throws IOException {
return Integer.parseInt(next());
}
static double readDouble() throws IOException {
return Double.parseDouble(next());
}
static char readChar() throws IOException {
return next().charAt(0);
}
static String readLine() throws IOException {
return br.readLine();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment