Handle AC display in partial checker

This commit is contained in:
cuom1999 2020-07-29 16:36:54 -05:00
parent f838f20d00
commit 7c8cd4632b
2 changed files with 5 additions and 3 deletions

View file

@ -39,9 +39,11 @@ class Module:
if not match:
raise InternalError('Invalid stderr for partial points: %r' % stderr)
points = float(match.group(0))
if not 0 <= points < 1:
if not 0 <= points <= 1:
raise InternalError('Invalid partial points: %d' % points)
return CheckerResult(False, points * point_value, feedback=feedback)
ac = (points == 1)
return CheckerResult(ac, points * point_value, feedback=feedback)
elif proc.returncode == cls.WA:
return CheckerResult(False, 0, feedback=feedback)
else: