Skip to content

Instantly share code, notes, and snippets.

@johncip
Created May 25, 2014 08:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save johncip/74063fe78b91bcc8a728 to your computer and use it in GitHub Desktop.
Save johncip/74063fe78b91bcc8a728 to your computer and use it in GitHub Desktop.
Contest problem fast I/O template
/*
* Title
*/
import java.io.BufferedOutputStream;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main {
static BufferedReader in = new BufferedReader(new InputStreamReader(
System.in));
static BufferedOutputStream out = new BufferedOutputStream(System.out);
static StringBuilder res = new StringBuilder();
/**
* Entry point.
*/
public static void main(String[] args) throws IOException {
String line;
while ((line = in.readLine()) != null) {
line = line.trim();
res.append(handleCase(line));
res.append('\n');
}
out.write(res.toString().getBytes());
in.close();
out.close();
}
/**
* Handles a case.
*/
static String handleCase(String line) {
return line;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment