mirror of
https://github.com/QingdaoU/Judger.git
synced 2025-01-04 03:11:41 +00:00
fix bugs in resource limit check
This commit is contained in:
parent
8e5b45adea
commit
4ee0cde0d3
@ -142,10 +142,10 @@ void run(struct config *_config, struct result *_result) {
|
||||
_result->result = MEMORY_LIMIT_EXCEEDED;
|
||||
}
|
||||
}
|
||||
if (_result->real_time > _config->max_real_time) {
|
||||
if (_config->max_real_time != UNLIMITED && _result->real_time > _config->max_real_time) {
|
||||
_result->result = REAL_TIME_LIMIT_EXCEEDED;
|
||||
}
|
||||
if (_result->cpu_time > _config->max_cpu_time) {
|
||||
if (_config->max_cpu_time != UNLIMITED && _result->cpu_time > _config->max_cpu_time) {
|
||||
_result->result = CPU_TIME_LIMITED;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user