精简 Problem 模型:移除 rule_type / total_score / io_mode
系统只用 ACM 模式且题目固定标准 IO,这三列已无实际用途: - rule_type / total_score:OI 专用,删除后 judge/dispatcher 的 OI 分支全部塌缩为 ACM - io_mode:判题改为固定发送 Standard IO 常量;languages.py 的 seccomp_rule 保留 dict 形态但改用字面量 key,不改判题机 wire 契约 - prompt 字段保留(预留给未来 AI 分析) Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -19,7 +19,7 @@ from utils.api import APIError, APIView, CSRFExemptAPIView, validate_serializer
|
||||
from utils.openai import get_ai_client
|
||||
from utils.shortcuts import natural_sort_key, rand_str
|
||||
|
||||
from ..models import Problem, ProblemRuleType, ProblemTag
|
||||
from ..models import Problem, ProblemTag
|
||||
from ..serializers import (
|
||||
AddContestProblemSerializer,
|
||||
ContestProblemMakePublicSerializer,
|
||||
@@ -195,14 +195,6 @@ class TestCaseAPI(CSRFExemptAPIView, TestCaseZipProcessor):
|
||||
class ProblemBase(APIView):
|
||||
def common_checks(self, request):
|
||||
data = request.data
|
||||
if data["rule_type"] == ProblemRuleType.OI:
|
||||
total_score = 0
|
||||
for item in data["test_case_score"]:
|
||||
if item["score"] <= 0:
|
||||
return "Invalid score"
|
||||
else:
|
||||
total_score += item["score"]
|
||||
data["total_score"] = total_score
|
||||
data["languages"] = list(data["languages"])
|
||||
|
||||
# SQL 题校验:.sql 测试点与 .in/.out 沙箱判题互斥,SQL 必须是唯一语言
|
||||
|
||||
Reference in New Issue
Block a user