mirror of
https://github.com/massbug/judge4c.git
synced 2025-05-18 07:16:34 +00:00
feat(config/judge): update result codes and language configurations
This commit is contained in:
parent
524cce5a73
commit
578e33d4c4
@ -1,15 +1,13 @@
|
|||||||
// Result type definitions
|
// Result type definitions
|
||||||
export enum ExitCode {
|
export enum ExitCode {
|
||||||
AC = 0, // Accepted
|
SE = 0, // System Error
|
||||||
WA = 1, // Wrong Answer
|
CS = 1, // Compilation Success
|
||||||
TLE = 2, // Time Limit Exceeded
|
CE = 2, // Compilation Error
|
||||||
MLE = 3, // Memory Limit Exceeded
|
TLE = 3, // Time Limit Exceeded
|
||||||
RE = 4, // Runtime Error
|
MLE = 4, // Memory Limit Exceeded
|
||||||
CE = 5, // Compilation Error
|
RE = 5, // Runtime Error
|
||||||
PE = 6, // Presentation Error
|
AC = 6, // Accepted
|
||||||
OLE = 7, // Output Limit Exceeded
|
WA = 7, // Wrong Answer
|
||||||
SE = 8, // System Error
|
|
||||||
SV = 9 // Security Violation
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export type JudgeResult = {
|
export type JudgeResult = {
|
||||||
@ -23,12 +21,14 @@ export interface LanguageConfig {
|
|||||||
id: string;
|
id: string;
|
||||||
label: string;
|
label: string;
|
||||||
fileName: string;
|
fileName: string;
|
||||||
extension: string;
|
fileExtension: string;
|
||||||
image: string;
|
image: string;
|
||||||
tag: string;
|
tag: string;
|
||||||
workingDir: string;
|
workingDir: string;
|
||||||
timeout: number;
|
timeLimit: number;
|
||||||
memoryLimit: number;
|
memoryLimit: number;
|
||||||
|
compileOutputLimit: number;
|
||||||
|
runOutputLimit: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
export const LanguageConfigs: Record<string, LanguageConfig> = {
|
export const LanguageConfigs: Record<string, LanguageConfig> = {
|
||||||
@ -36,22 +36,26 @@ export const LanguageConfigs: Record<string, LanguageConfig> = {
|
|||||||
id: "c",
|
id: "c",
|
||||||
label: "C",
|
label: "C",
|
||||||
fileName: "main",
|
fileName: "main",
|
||||||
extension: "c",
|
fileExtension: "c",
|
||||||
image: "gcc",
|
image: "gcc",
|
||||||
tag: "latest",
|
tag: "latest",
|
||||||
workingDir: "/src",
|
workingDir: "/src",
|
||||||
timeout: 1000,
|
timeLimit: 10000,
|
||||||
memoryLimit: 128,
|
memoryLimit: 128,
|
||||||
|
compileOutputLimit: 1 * 1024 * 1024,
|
||||||
|
runOutputLimit: 1 * 1024 * 1024,
|
||||||
},
|
},
|
||||||
cpp: {
|
cpp: {
|
||||||
id: "cpp",
|
id: "cpp",
|
||||||
label: "C++",
|
label: "C++",
|
||||||
fileName: "main",
|
fileName: "main",
|
||||||
extension: "cpp",
|
fileExtension: "cpp",
|
||||||
image: "gcc",
|
image: "gcc",
|
||||||
tag: "latest",
|
tag: "latest",
|
||||||
workingDir: "/src",
|
workingDir: "/src",
|
||||||
timeout: 1000,
|
timeLimit: 10000,
|
||||||
memoryLimit: 128,
|
memoryLimit: 128,
|
||||||
|
compileOutputLimit: 1 * 1024 * 1024,
|
||||||
|
runOutputLimit: 1 * 1024 * 1024,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user