Skip to content

Commit 2b05128

Browse files
authored
Merge pull request #228 from simonlindholm/allow-negative-score
Allow negative scores as grader output
2 parents 2f997b5 + 7e4b059 commit 2b05128

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

problemtools/verifyproblem.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1297,7 +1297,7 @@ def grade(self, sub_results, testcasegroup, shadow_result=False):
12971297
graders = self._graders
12981298

12991299
grader_input = ''.join(['%s %s\n' % (r.verdict, 0 if r.score is None else r.score) for r in sub_results])
1300-
grader_output_re = r'^((AC)|(WA)|(TLE)|(RTE)|(JE))\s+[0-9.]+\s*$'
1300+
grader_output_re = r'^((AC)|(WA)|(TLE)|(RTE)|(JE))\s+-?[0-9.]+\s*$'
13011301
verdict = 'AC'
13021302
score = 0
13031303

0 commit comments

Comments
 (0)