feat: add unified contest pool and realtime game modes

This commit is contained in:
2026-08-10 00:31:21 +08:00
parent 97ca20413e
commit 40e9462842
18 changed files with 822 additions and 152 deletions
@@ -195,7 +195,6 @@ class Command(BaseCommand):
ContestQuestion.objects.filter(contest=contest).delete()
pool = list(versions[track])
random.shuffle(pool)
selected = pool[:8]
ContestQuestion.objects.bulk_create(
[
ContestQuestion(
@@ -204,7 +203,7 @@ class Command(BaseCommand):
order=index,
points=100,
)
for index, version in enumerate(selected, start=1)
for index, version in enumerate(pool, start=1)
]
)
total = sum(map(len, QUESTIONS.values()))