Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.io.*
- import java.util.*
- import java.lang.Math.*
- class $FILE$ {
- fun solve(io: FastIO) {
- $END$
- }
- fun main(args: Array<String>) {
- FastIO(System.`in`, System.out).use {
- solve(it)
- }
- }
- class FastIO(inp: InputStream, out: OutputStream) : PrintWriter(out) {
- private val reader = BufferedReader(InputStreamReader(inp))
- private var tokenizer = StringTokenizer("")
- fun nextToken(): String? {
- while (!tokenizer.hasMoreTokens()) {
- val s = reader.readLine() ?: return null
- tokenizer = StringTokenizer(s)
- }
- return tokenizer.nextToken()
- }
- fun nextInt() = nextToken()!!.toInt()
- fun nextLong() = nextToken()!!.toLong()
- fun nextDouble() = nextToken()!!.toDouble()
- fun nextWord() = nextToken()!!
- fun nextLine() = reader.readLine()
- }
- fun run() {
- FastIO(System.`in`, System.out).use {
- solve(it)
- }
- }
- }
- fun main(args: Array<String>) {
- $FILE$().run()
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement