judge: only skip subtask if score marked as zero

pull/398/head
undefined 2 years ago
parent 008c30c8e0
commit 838374b74c

@ -1,7 +1,7 @@
{
"name": "@hydrooj/hydrojudge",
"bin": "bin/hydrojudge.js",
"version": "2.22.3",
"version": "2.22.4",
"main": "package.json",
"author": "undefined <i@undefined.moe>",
"repository": "https://github.com/hydro-dev/Hydro.git",

@ -21,7 +21,8 @@ const logger = new Logger('judge/default');
function judgeCase(c: NormalizedCase, sid: string) {
return async (ctx: Context, ctxSubtask: ContextSubTask, runner?: Function) => {
if (ctx.errored || (ctx.failed[sid] && ctxSubtask.subtask.type === 'min')
if (ctx.errored
|| (ctxSubtask.subtask.type === 'min' && ctxSubtask.score === 0)
|| (ctxSubtask.subtask.type === 'max' && ctxSubtask.score === ctxSubtask.subtask.score)
|| ((ctxSubtask.subtask.if || []).filter((i) => ctx.failed[i]).length)
) {

Loading…
Cancel
Save