ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1891. Language Ocean

WA #20
Posted by igloo 21 Jun 2013 02:10
"The interpreter must check EACH LINE of the main program searching for the following errors".

Edited by author 21.06.2013 02:12
Re: WA #20
Posted by Jane Soboleva (SumNU) 29 Oct 2015 05:23
Which means that lines have a priority, not types of errors.
Say, the program has 1st type of error in line 10, and 2nd + 4th types of error in line 2.
When i had WA20, i checked for each of 4 types of errors in that order, and if i found one, i wrote it and finished my program (in this case, outputting error in line 10).
Instead, you should check for all 4 types of errors in all lines, and output an earliest line in which an error occurs. And if several errors occur in that earliest line, then you should output an error with higher priority. Thus for case above, you should output 2nd error type in line 2.