This commit is contained in:
cuom1999 2023-01-02 18:18:03 -06:00
parent 07d5ad2216
commit 6c1d0c7672
2 changed files with 3 additions and 7 deletions

View file

@ -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):
"""

View file

@ -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 = {}