Hello Codeforces,
The following three Kotlin lines:
import java.io.*
val cin = System.`in`.bufferedReader()
val cout = PrintWriter(System.out.bufferedWriter())
along with appropriate function calls were sufficient to achieve significant speed-up to the execution-time of the following problem:
Check the following accepted submissions:
Feel free to use these lines in your Kotlin code, and make sure that cout.flush()
is the last statement in your program, unless you are solving an interactive problem in which flushing the data output buffer is required more frequently to interact correctly with the automatic judge.
Best wishes