judge: only skip subtask if score marked as zero

This commit is contained in:
undefined committed 2022-08-04 16:11:32 +08:00
1 parent 008c30c8e0
commit 838374b74c
2 files changed
+3 -2

No files matched your search

+2 -1
View File
@@ -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)
) {