Skip to content

Instantly share code, notes, and snippets.

@jdabtieu
Last active Jul 30, 2022
Embed
What would you like to do?
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