mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
judge: subtask score calculation fix
This commit is contained in:
1 parent
aa3721fdc1
commit
24cd356f78
2 files changed
+5
-5
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.12.16",
|
"version": "2.12.17",
|
||||||
"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",
|
||||||
@@ -14,9 +14,9 @@
|
|||||||
"js-yaml": "^4.1.0",
|
"js-yaml": "^4.1.0",
|
||||||
"lodash": "^4.17.21",
|
"lodash": "^4.17.21",
|
||||||
"mongodb": "^3.7.3",
|
"mongodb": "^3.7.3",
|
||||||
"p-queue": "^7.1.0",
|
"p-queue": "^7.2.0",
|
||||||
"shell-quote": "^1.7.3",
|
"shell-quote": "^1.7.3",
|
||||||
"ws": "^8.4.0"
|
"ws": "^8.4.2"
|
||||||
},
|
},
|
||||||
"preferUnplugged": true,
|
"preferUnplugged": true,
|
||||||
"license": "AGPL-3.0-or-later",
|
"license": "AGPL-3.0-or-later",
|
||||||
|
|||||||
@@ -143,8 +143,8 @@ async function read1(folder: string, files: string[], checkFile, cfg, rst) {
|
|||||||
const config = { count: 0, subtasks };
|
const config = { count: 0, subtasks };
|
||||||
const keys = Object.keys(subtask);
|
const keys = Object.keys(subtask);
|
||||||
for (let i = 0; i < keys.length; i++) {
|
for (let i = 0; i < keys.length; i++) {
|
||||||
if (extra < i) subtask[keys[i]].score = base;
|
if (i >= extra) subtask[keys[i]].score = base + 1;
|
||||||
else subtask[keys[i]].score = base + 1;
|
else subtask[keys[i]].score = base;
|
||||||
for (const j of subtask[keys[i]].cases) {
|
for (const j of subtask[keys[i]].cases) {
|
||||||
config.count++;
|
config.count++;
|
||||||
j.input = checkFile(j.input);
|
j.input = checkFile(j.input);
|
||||||
|
|||||||
Reference in new issue
Block a user