From 6c1d0c767211fe38fce6f2a3b6fa2891bee19126 Mon Sep 17 00:00:00 2001 From: cuom1999 Date: Mon, 2 Jan 2023 18:18:03 -0600 Subject: [PATCH] Fix bug --- judge/contest_format/base.py | 5 ++--- judge/contest_format/new_ioi.py | 5 +---- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/judge/contest_format/base.py b/judge/contest_format/base.py index e64e211..bea3db4 100644 --- a/judge/contest_format/base.py +++ b/judge/contest_format/base.py @@ -11,14 +11,13 @@ class abstractclassmethod(classmethod): class BaseContestFormat(metaclass=ABCMeta): + has_hidden_subtasks = False + @abstractmethod def __init__(self, contest, config): self.config = config self.contest = contest - # Use in ioi16 to display ranking with hidden subtasks - self.has_hidden_subtasks = False - @abstractproperty def name(self): """ diff --git a/judge/contest_format/new_ioi.py b/judge/contest_format/new_ioi.py index 758680f..6e09353 100644 --- a/judge/contest_format/new_ioi.py +++ b/judge/contest_format/new_ioi.py @@ -10,14 +10,11 @@ from judge.timezone import from_database_time, to_database_time class NewIOIContestFormat(IOIContestFormat): name = gettext_lazy("New IOI") config_defaults = {"cumtime": False} + has_hidden_subtasks = True """ cumtime: Specify True if time penalties are to be computed. Defaults to False. """ - def __init__(self, contest, config): - super().__init__(contest, config) - self.has_hidden_subtasks = True - def get_hidden_subtasks(self): queryset = self.contest.contest_problems.values_list("id", "hidden_subtasks") res = {}