Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Double hard wall time limit for interactive problems. #2144

Merged
merged 1 commit into from
Sep 18, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions judge/judgedaemon.main.php
Original file line number Diff line number Diff line change
Expand Up @@ -1350,10 +1350,6 @@ function judge(array $judgeTask): bool
}

// do the actual test-run
$hardtimelimit = $run_config['time_limit'] +
overshoot_time($run_config['time_limit'], $overshoot);


$combined_run_compare = $compare_config['combined_run_compare'];
[$run_runpath, $error] = fetch_executable(
$workdirpath,
Expand Down Expand Up @@ -1383,6 +1379,16 @@ function judge(array $judgeTask): bool
}
}

$hardtimelimit = $run_config['time_limit'] +
overshoot_time($run_config['time_limit'], $overshoot);
if ($combined_run_compare) {
// This accounts for wall time spent in the validator. We may likely
// want to make this configurable in the future. The current factor is
// under the assumption that the validator has to do approximately the
// same amount of work wall-time wise as the submission.
$hardtimelimit *= 2;
}

// While we already set those above to likely the same values from the
// compile config, we do set them again from the compare config here.
putenv('SCRIPTTIMELIMIT=' . $compare_config['script_timelimit']);
Expand Down
Loading