mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
judge: better config
This commit is contained in:
1 parent
a9a2b4023a
commit
2cc9c6a06a
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.1.32",
|
"version": "2.1.33",
|
||||||
"main": "package.json",
|
"main": "package.json",
|
||||||
"author": "masnn",
|
"author": "masnn",
|
||||||
"repository": "https://github.com/hydro-dev/Hydro.git",
|
"repository": "https://github.com/hydro-dev/Hydro.git",
|
||||||
|
|||||||
@@ -226,8 +226,8 @@ export async function readYamlCases(folder: string, cfg: Dictionary<any> = {}, a
|
|||||||
if (cfg.cases) {
|
if (cfg.cases) {
|
||||||
config.subtasks = [{
|
config.subtasks = [{
|
||||||
score: parseInt(cfg.score, 10) || Math.floor(100 / config.count),
|
score: parseInt(cfg.score, 10) || Math.floor(100 / config.count),
|
||||||
time_limit_ms: parseTimeMS(cfg.time),
|
time_limit_ms: parseTimeMS(cfg.time || '1s'),
|
||||||
memory_limit_mb: parseMemoryMB(cfg.memory),
|
memory_limit_mb: parseMemoryMB(cfg.memory || '512m'),
|
||||||
cases: [],
|
cases: [],
|
||||||
type: 'sum',
|
type: 'sum',
|
||||||
}];
|
}];
|
||||||
@@ -254,8 +254,8 @@ export async function readYamlCases(folder: string, cfg: Dictionary<any> = {}, a
|
|||||||
score: parseInt(subtask.score, 10),
|
score: parseInt(subtask.score, 10),
|
||||||
if: subtask.if || [],
|
if: subtask.if || [],
|
||||||
cases,
|
cases,
|
||||||
time_limit_ms: parseTimeMS(subtask.time || cfg.time),
|
time_limit_ms: parseTimeMS(subtask.time || cfg.time || '1s'),
|
||||||
memory_limit_mb: parseMemoryMB(subtask.memory || cfg.memory),
|
memory_limit_mb: parseMemoryMB(subtask.memory || cfg.memory || '512m'),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in new issue
Block a user