judge: ignore fail when subtaskType isn't min

This commit is contained in:
undefined committed 2021-08-08 17:30:53 +08:00
1 parent 88eae576dc
commit 81c1e0cfd8
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "@hydrooj/hydrojudge",
"bin": "bin/hydrojudge.js",
"version": "2.10.5",
"version": "2.10.6",
"main": "package.json",
"author": "undefined <i@undefined.moe>",
"repository": "https://github.com/hydro-dev/Hydro.git",
+1 -1
View File
@@ -18,7 +18,7 @@ const Score = {
function judgeCase(c, sid: string) {
return async (ctx, ctxSubtask) => {
if (ctx.failed[sid] || ctx.errored
if (ctx.errored || (ctx.failed[sid] && ctxSubtask.subtask.type === 'min')
|| (ctxSubtask.subtask.type === 'max' && ctxSubtask.score === ctxSubtask.subtask.score)
|| ((ctxSubtask.subtask.if || []).filter((i: string) => ctx.failed[i]).length)
) {