judge: cases: disable testdata count check for objective

This commit is contained in:
undefined committed 2024-01-23 00:00:41 +08:00
1 parent 01856e1705
commit 33cb8aca38
1 file changed
+1 -1
+1 -1
View File
@@ -12,7 +12,7 @@ import { NextFunction, ParsedConfig } from './interface';
import { ensureFile, parseMemoryMB } from './utils';
function isValidConfig(config) {
if (config.count > (getConfig('testcases_max') || 100)) {
if (config.type !== 'objective' && config.count > (getConfig('testcases_max') || 100)) {
throw new FormatError('Too many testcases. Cancelled.');
}
const time = Math.sum(...config.subtasks.flatMap((subtask) => subtask.cases.map((c) => c.time)));