mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
judge: only skip subtask if score marked as zero
This commit is contained in:
1 parent
008c30c8e0
commit
838374b74c
2 files changed
+3
-2
No files matched your search
@@ -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)
|
||||
) {
|
||||
|
||||
Reference in new issue
Block a user