Skip to content

Commit

Permalink
guidelines
Browse files Browse the repository at this point in the history
  • Loading branch information
LLaammTTeerr committed Apr 22, 2024
1 parent e480209 commit 21a4c6a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
1 change: 0 additions & 1 deletion judge/contest_format/ioi.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
from django.db import connection
from django.db.models import OuterRef, Subquery
from django.utils.translation import gettext as _, gettext_lazy

from judge.contest_format.legacy_ioi import LegacyIOIContestFormat
Expand Down
6 changes: 3 additions & 3 deletions judge/models/contest.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
from judge import contest_format, event_poster as event
from judge.models.problem import Problem
from judge.models.profile import Organization, Profile
from judge.models.submission import Submission
from judge.models.problem_data import ProblemTestCase
from judge.models.submission import Submission
from judge.ratings import rate_contest
from judge.utils.unicode import utf8bytes

Expand Down Expand Up @@ -687,7 +687,8 @@ class ContestProblem(models.Model):

@property
def points_scaling_factor(self):
testcaseset = ProblemTestCase.objects.filter(dataset=self.problem).order_by('order').values_list('type', 'points')
testcaseset = ProblemTestCase.objects.filter(dataset=self.problem)
.order_by('order').values_list('type', 'points')
sum_batch_points = 0
batch = False
for type, points in testcaseset:
Expand All @@ -701,7 +702,6 @@ def points_scaling_factor(self):
batch = False
return self.points / sum_batch_points


class Meta:
unique_together = ('problem', 'contest')
verbose_name = _('contest problem')
Expand Down

0 comments on commit 21a4c6a

Please sign in to comment.