From 2dc1d0cbce59c2983699d83fbd65cea77bcc9d1c Mon Sep 17 00:00:00 2001 From: virusdefender Date: Sat, 5 Jan 2019 13:13:30 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20ACM=20=E7=B1=BB=E5=9E=8B?= =?UTF-8?q?=E9=A2=98=E7=9B=AE=E5=AF=BC=E5=85=A5=E5=90=8E=EF=BC=8C=E6=97=A0?= =?UTF-8?q?=E6=B3=95=E6=98=BE=E7=A4=BA=E6=B5=8B=E8=AF=95=E7=94=A8=E4=BE=8B?= =?UTF-8?q?=E4=BF=A1=E6=81=AF=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- problem/serializers.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/problem/serializers.py b/problem/serializers.py index dbea96b7..de9bfdf6 100644 --- a/problem/serializers.py +++ b/problem/serializers.py @@ -154,8 +154,9 @@ class ExportProblemSerializer(serializers.ModelSerializer): return self._html_format_value(obj.hint) def get_test_case_score(self, obj): - return [{"score": item["score"], "input_name": item["input_name"], "output_name": item["output_name"]} - for item in obj.test_case_score] if obj.rule_type == ProblemRuleType.OI else None + return [{"score": item["score"] if obj.rule_type == ProblemRuleType.OI else 100, + "input_name": item["input_name"], "output_name": item["output_name"]} + for item in obj.test_case_score] def get_spj(self, obj): return {"code": obj.spj_code,