judge: support time_limit_rate & memory_limit_rate per problem (#541)

Co-authored-by: panda <panda_dtdyy@outlook.com>
This commit is contained in:
undefinedandpanda authored and GitHub committed 2023-03-22 19:09:54 +08:00
1 parent f01a8b6671
commit 560e7c627f
13 files changed
+38 -19

No files matched your search

+2
View File
@@ -8,6 +8,7 @@ export interface LangConfig {
highlight: string;
monaco: string;
time_limit_rate: number;
memory_limit_rate: number;
domain: string[];
display: string;
target?: string;
@@ -38,6 +39,7 @@ export function parseLang(config: string): Record<string, LangConfig> {
entry.highlight ||= key;
entry.monaco ||= entry.highlight;
entry.time_limit_rate ||= 1;
entry.memory_limit_rate ||= 1;
entry.code_file ||= `foo.${key}`;
entry.execute ||= '/w/foo';
entry.key = key;