From bf038fd8d192121e0d8071a7b4de44ab1449a65c Mon Sep 17 00:00:00 2001 From: Clumsy-Coder <19594044+Clumsy-Coder@users.noreply.github.com> Date: Sat, 6 Jan 2024 11:06:38 -0700 Subject: [PATCH] chore(types): add object `ProblemVerdictMap` ## what - add object `ProblemVerdictMap` ## how ## why - will be used to convert verdict keys in `Problem` type into a readable string ## where - ./src/types/index.ts ## usage --- src/types/index.ts | 51 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) diff --git a/src/types/index.ts b/src/types/index.ts index a835193..74a3351 100644 --- a/src/types/index.ts +++ b/src/types/index.ts @@ -4,6 +4,57 @@ export const ProblemStatus: Record = { 2: "Special judge", }; +export const ProblemVerdictMap: Record = { + /** + * Number of Accepted + */ + ac: "Accepted", + /** + * Number of Presentation Error + */ + pe: "Presentation error", + /** + * Number of Wrong Answer + */ + wa: "Wrong answer", + /** + * Number of Time Limit Exceeded + */ + tle: "Time limit exceeded", + /** + * Number of Memory Limit Exceeded + */ + mle: "Memory limit exceeded", + /** + * Number of Compilation Error + */ + ce: "Compile error", + /** + * Number of Runtime Error + */ + re: "Runtime error", + /** + * Number of Output Limit Exceeded + */ + ole: "Output limit exceeded", + /** + * Number of Submission Error + */ + // sube: "Submission Error", + /** + * Number of Can't be Judged + */ + // noj: "Can't be judged", + /** + * Number of In Queue + */ + // inq: number, + /** + * Number of Restricted Function + */ + // rf: "Restricted function", +} + /** * Data structure returned when querying from url `https://uhunt.onlinejudge.org/api/p/num/:num` *