diff --git a/templates/about/custom-checker-sample.html b/templates/about/custom-checker-sample.html index ebbf580..ad353c4 100644 --- a/templates/about/custom-checker-sample.html +++ b/templates/about/custom-checker-sample.html @@ -102,7 +102,7 @@ main.exe [input_file] [output_file] [ans_file] Những thông tin được viết ra stdout (bằng cout) sẽ được in ra màn hình cho người nộp bài(feedback)

diff --git a/validator_template/template.py b/validator_template/template.py index c131b9b..9144f70 100644 --- a/validator_template/template.py +++ b/validator_template/template.py @@ -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: