更新超时逻辑

This commit is contained in:
MeiK2333 2021-01-21 15:24:37 +08:00
parent f7c3223786
commit 98f6458cb2

View File

@ -82,6 +82,11 @@ pub async fn judge(
// MLE
return Ok(memory_limit_exceeded(status.time_used, mem_used));
} else if status.signal != 0 {
// 因墙上时钟超时被主动中断
if status.real_time_used as i64 > time_limit.into() {
// TLE
return Ok(time_limit_exceeded(status.time_used, mem_used));
}
// RE
return Ok(runtime_error(
status.time_used,