mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-19 09: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",
|
||||
"bin": "bin/hydrojudge.js",
|
||||
"version": "2.1.32",
|
||||
"version": "2.1.33",
|
||||
"main": "package.json",
|
||||
"author": "masnn",
|
||||
"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) {
|
||||
config.subtasks = [{
|
||||
score: parseInt(cfg.score, 10) || Math.floor(100 / config.count),
|
||||
time_limit_ms: parseTimeMS(cfg.time),
|
||||
memory_limit_mb: parseMemoryMB(cfg.memory),
|
||||
time_limit_ms: parseTimeMS(cfg.time || '1s'),
|
||||
memory_limit_mb: parseMemoryMB(cfg.memory || '512m'),
|
||||
cases: [],
|
||||
type: 'sum',
|
||||
}];
|
||||
@@ -254,8 +254,8 @@ export async function readYamlCases(folder: string, cfg: Dictionary<any> = {}, a
|
||||
score: parseInt(subtask.score, 10),
|
||||
if: subtask.if || [],
|
||||
cases,
|
||||
time_limit_ms: parseTimeMS(subtask.time || cfg.time),
|
||||
memory_limit_mb: parseMemoryMB(subtask.memory || cfg.memory),
|
||||
time_limit_ms: parseTimeMS(subtask.time || cfg.time || '1s'),
|
||||
memory_limit_mb: parseMemoryMB(subtask.memory || cfg.memory || '512m'),
|
||||
});
|
||||
}
|
||||
} else {
|
||||
|
||||
Reference in new issue
Block a user