judge: better scoring method

This commit is contained in:
undefined committed 2021-08-03 21:31:32 +08:00
1 parent b0e7512d7a
commit 2393f105dc
9 files changed
+32 -32

No files matched your search

+1 -1
View File
@@ -60,7 +60,7 @@ export default async function readYamlCases(cfg: Record<string, any> = {}, check
});
}
config.subtasks.push({
score: parseInt(subtask.score, 10) || 100,
score: Number.isSafeInteger(+subtask.score) ? +subtask.score : 100,
if: subtask.if || [],
cases,
type: subtask.type || 'min',