diff --git a/packages/hydrojudge/package.json b/packages/hydrojudge/package.json index ad539315a..7bce740b4 100644 --- a/packages/hydrojudge/package.json +++ b/packages/hydrojudge/package.json @@ -1,7 +1,7 @@ { "name": "@hydrooj/hydrojudge", "bin": "bin/hydrojudge.js", - "version": "2.22.5", + "version": "2.22.6", "main": "package.json", "author": "undefined ", "repository": "https://github.com/hydro-dev/Hydro.git", diff --git a/packages/hydrojudge/src/judge/objective.ts b/packages/hydrojudge/src/judge/objective.ts index 8de5eee69..6a1e51f36 100644 --- a/packages/hydrojudge/src/judge/objective.ts +++ b/packages/hydrojudge/src/judge/objective.ts @@ -38,8 +38,9 @@ export async function judge({ time: 0, memory: 0, }; - if (typeof ansInfo[0] === 'string') { - if (ansInfo[0]?.trim() === (answers[key] as any)?.trim()) { + if (typeof answers[key] === 'string') { + const stdAns = typeof ansInfo[0] === 'string' ? [ansInfo[0]] : ansInfo[0]; + if (stdAns.some((ans) => ans.trim() === (answers[key] as any)?.trim())) { totalScore += score; totalStatus = Math.max(totalStatus, STATUS.STATUS_ACCEPTED); next({