mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
judge: objective
This commit is contained in:
1 parent
ac289ae955
commit
ca22feb62a
2 files changed
+2
-2
No files matched your search
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "@hydrooj/hydrojudge",
|
"name": "@hydrooj/hydrojudge",
|
||||||
"bin": "bin/hydrojudge.js",
|
"bin": "bin/hydrojudge.js",
|
||||||
"version": "2.22.10",
|
"version": "2.22.11",
|
||||||
"main": "package.json",
|
"main": "package.json",
|
||||||
"author": "undefined <i@undefined.moe>",
|
"author": "undefined <i@undefined.moe>",
|
||||||
"repository": "https://github.com/hydro-dev/Hydro.git",
|
"repository": "https://github.com/hydro-dev/Hydro.git",
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ export async function judge({
|
|||||||
for (const key in config.answers) {
|
for (const key in config.answers) {
|
||||||
const [subtaskId, caseId] = key.split('-').map(Number);
|
const [subtaskId, caseId] = key.split('-').map(Number);
|
||||||
const ansInfo = config.answers[key] as [string | string[], number];
|
const ansInfo = config.answers[key] as [string | string[], number];
|
||||||
const score = ansInfo[1];
|
const score = (+ansInfo[1]) || 0;
|
||||||
const baseInfo = {
|
const baseInfo = {
|
||||||
subtaskId,
|
subtaskId,
|
||||||
id: caseId,
|
id: caseId,
|
||||||
|
|||||||
Reference in new issue
Block a user