Last active
December 15, 2015 06:49
-
-
Save dotslash/5219216 to your computer and use it in GitHub Desktop.
Scala Template
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.io._ | |
import java.util._ | |
import java.math._ | |
class InputReader(stream: InputStream) | |
{ | |
val br : BufferedReader = new BufferedReader(new InputStreamReader(stream)) | |
var tokenizer : StringTokenizer = null | |
def ns() : String = { | |
while (tokenizer == null || !tokenizer.hasMoreTokens()) | |
tokenizer = new StringTokenizer(br.readLine()) | |
return tokenizer.nextToken() | |
} | |
def nline() : String = { | |
tokenizer = null | |
return br.readLine() | |
} | |
def close() { | |
br.close() | |
} | |
} | |
object Main extends App{ | |
val in : InputReader = new InputReader(System.in) | |
val out = new PrintWriter(System.out) | |
out.flush() | |
out.close() | |
in.close() | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment