From 3d1ab62fe964a3103f62d8263f7a194f332e84ff Mon Sep 17 00:00:00 2001 From: cfngc4594 Date: Sun, 2 Mar 2025 13:39:31 +0800 Subject: [PATCH] feat(judge): update configuration with exit codes and result type --- src/config/judge.ts | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/src/config/judge.ts b/src/config/judge.ts index 8110d9d..932d804 100644 --- a/src/config/judge.ts +++ b/src/config/judge.ts @@ -1,3 +1,24 @@ +// Result type definitions +export enum ExitCode { + AC = 0, // Accepted + WA = 1, // Wrong Answer + TLE = 2, // Time Limit Exceeded + MLE = 3, // Memory Limit Exceeded + RE = 4, // Runtime Error + CE = 5, // Compilation Error + PE = 6, // Presentation Error + OLE = 7, // Output Limit Exceeded + SE = 8, // System Error + SV = 9 // Security Violation +} + +export type JudgeResult = { + output: string; + exitCode: ExitCode; + executionTime?: number; + memoryUsage?: number; +}; + export interface LanguageConfig { id: string; label: string;