Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.io.*;
- import java.math.*;
- import java.util.*;
- public class Solution {
- public void solve() throws IOException {
- }
- public static void main(String[] args) throws IOException {
- Solution solution = new Solution();
- solution.run(new InputStreamReader(System.in),
- new OutputStreamWriter(System.out));
- System.exit(0);
- }
- private BufferedReader reader;
- private StringTokenizer tokenizer;
- private String separator;
- public PrintWriter out;
- public final byte getByte() throws IOException {
- return Byte.parseByte(getToken());
- }
- public final double getDouble() throws IOException {
- return Double.parseDouble(getToken());
- }
- public final int getInt() throws IOException {
- return Integer.parseInt(getToken());
- }
- public final String getLine() throws IOException {
- if (tokenizer.hasMoreTokens()) {
- return tokenizer.nextToken(separator);
- }
- return reader.readLine();
- }
- public final long getLong() throws IOException {
- return Long.parseLong(getToken());
- }
- public final short getShort() throws IOException {
- return Short.parseShort(getToken());
- }
- public final String getToken() throws IOException {
- while (!tokenizer.hasMoreTokens()) {
- tokenizer = new StringTokenizer(reader.readLine());
- }
- return tokenizer.nextToken();
- }
- public final boolean isEndOfLine() {
- return tokenizer.hasMoreTokens();
- }
- public final void putBlank() {
- out.print(' ');
- }
- public final void run(Reader reader, Writer writer) throws IOException {
- this.reader = new BufferedReader(reader);
- out = new PrintWriter(writer);
- tokenizer = new StringTokenizer("");
- separator = System.getProperty("line.separator");
- separator = Character.toString(separator.charAt(separator.length() - 1));
- solve();
- out.flush();
- }
- }
Add Comment
Please, Sign In to add comment