You are viewing a single comment's thread. Return to all comments →
A hack would be to read everything as val points = scala.io.Source.stdin.getLines() which is a Iterator[String] and get N as
val N = points.next()
Actually val lines = stdin.getLines().drop(1) will give you all lines you need, dropping the first one, which is good enough for this problems. In real life, though, it's better not to do it this way.
val lines = stdin.getLines().drop(1)