fix: Hydro 状态码映射实证修正(1=AC 2=WA 6=RE 7=CE 20=JUDGING)
这个提交包含在:
@@ -22,7 +22,7 @@ class JudgeCase:
|
||||
@dataclass
|
||||
class JudgeResult:
|
||||
rid: str
|
||||
status: int = 0 # 0=等待 1=判题中 2=AC 3=WA 5=TLE 7=RE 8=CE
|
||||
status: int = 0 # Hydro: 0=等待 1=AC 2=WA 3=TLE 4=MLE 5=OLE 6=RE 7=CE 8=SE 20=判题中
|
||||
score: int = 0
|
||||
time_ms: int = 0
|
||||
memory_kb: int = 0
|
||||
@@ -31,11 +31,16 @@ class JudgeResult:
|
||||
|
||||
@property
|
||||
def verdict(self) -> str:
|
||||
return {0: "PENDING", 1: "JUDGING", 2: "AC", 3: "WA", 5: "TLE", 7: "RE", 8: "CE"}.get(self.status, "UNKNOWN")
|
||||
return {
|
||||
0: "PENDING", 1: "AC", 2: "WA", 3: "TLE", 4: "MLE", 5: "OLE",
|
||||
6: "RE", 7: "CE", 8: "SE", 9: "CANCELED", 20: "JUDGING",
|
||||
21: "COMPILING", 22: "FETCHED", 30: "IGNORED", 31: "FORMAT_ERROR",
|
||||
}.get(self.status, "UNKNOWN")
|
||||
|
||||
@property
|
||||
def done(self) -> bool:
|
||||
return self.status >= 2
|
||||
# NORMAL_STATUS = 1..8(AC/WA/TLE/MLE/OLE/RE/CE/SE)
|
||||
return 1 <= self.status <= 8
|
||||
|
||||
|
||||
class JudgeEngineError(Exception):
|
||||
|
||||
在新工单中引用
屏蔽一个用户