diff --git a/frontend/index.html b/frontend/index.html index 961e6d5..86e25a5 100644 --- a/frontend/index.html +++ b/frontend/index.html @@ -375,28 +375,34 @@ function mockJudge(code){ if(/idx\s*=\s*i/.test(code)&&!/\+\s*1/.test(code)&&!/idx\s*\+=/.test(code)) return {status:3,verdict:'Wrong Answer',color:'jc-fail',pill:'v-fail',tests:[ {in:'5 / 3 7 2 9 1',exp:'9 3',act:'9 4',ok:false},{in:'3 / 5 5 5',exp:'5 1',act:'5 0',ok:false}, {in:'4 / 1 2 3 4',exp:'4 4',act:'4 3',ok:false},{in:'1 / 42',exp:'42 1',act:'42 0',ok:false}]}; - return {status:2,verdict:'Accepted',color:'jc-pass',pill:'v-ok',tests:[ + return {status:1,verdict:'Accepted',color:'jc-pass',pill:'v-ok',tests:[ {in:'5 / 3 7 2 9 1',exp:'9 3',act:'9 3',ok:true},{in:'3 / 5 5 5',exp:'5 1',act:'5 1',ok:true}, {in:'4 / 1 2 3 4',exp:'4 4',act:'4 4',ok:true},{in:'1 / 42',exp:'42 1',act:'42 1',ok:true}, {in:'6 / 10 2 8 8 3 0',exp:'10 1',act:'10 1',ok:true}]}; } function renderJudgeCard(result, code){ - var ver=(result.status===2?'Accepted':(result.status===3?'Wrong Answer':(result.status===5?'Time Limit Exceeded':'Compile Error'))); + /* Hydro 状态:1=AC 2=WA 3=TLE 4=MLE 5=OLE 6=RE 7=CE 8=SE(实证) */ + var st=result.status; + var VN={1:'Accepted',2:'Wrong Answer',3:'Time Limit Exceeded',4:'Memory Limit Exceeded',5:'Output Limit Exceeded',6:'Runtime Error',7:'Compile Error',8:'System Error'}; + var ver=result.verdict||VN[st]||('Status '+st); + var color=st===1?'jc-pass':(st>=2&&st<=8?'jc-fail':'jc-err'); + var pill=st===1?'v-ok':(st>=2&&st<=8?'v-fail':'v-err'); + var isAC=st===1; var tbl='
| # | 输入 | 期望 | 实际 | 结果 |
|---|---|---|---|---|
| '+(i+1)+' | '+t.in+' | '+t.exp+' | '+t.act+' | '+(t.ok?'✓ 通过':'✗ 错误')+' |