Please read the new rule regarding the restriction on the use of AI tools. ×

saucam's blog

By saucam, history, 4 years ago, In English

I am trying to use scala for solving problems.

I tried submitting the code for this simple problem: https://codeforces.me/problemset/problem/71/A

And the code starts by importing StdIn functions readInt and readLine.

import scala.io.StdIn.{ readInt, readLine }

object Main {
...

When I try to submit, I get regex validation failure and UI does not let me submit the code:


Source should satisfy regex [^{}]*object\s+(\w+).*

I think it is because of the way regex is implemented it does not allow

import scala.io.StdIn.{ readInt, readLine } 

but allows

import scala.io.StdIn._

This should be an easy fix.

Full text and comments »

  • Vote: I like it
  • +10
  • Vote: I do not like it