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.