Documentation ¶
Index ¶
Constants ¶
View Source
const ( JudgeFlagAC = 0 // 0 Accepted JudgeFlagPE = 1 // 1 Presentation Error JudgeFlagTLE = 2 // 2 Time Limit Exceeded JudgeFlagMLE = 3 // 3 Memory Limit Exceeded JudgeFlagWA = 4 // 4 Wrong Answer JudgeFlagRE = 5 // 5 Runtime Error JudgeFlagOLE = 6 // 6 Output Limit Exceeded JudgeFlagCE = 7 // 7 Compile Error JudgeFlagSE = 8 // 8 System Error JudgeFlagSpecialJudgeTimeout = 10 // 10 Special Judge Checker Time OUT JudgeFlagSpecialJudgeError = 11 // 11 Special Judge Checker ERROR JudgeFlagSpecialJudgeRequireChecker = 12 // 12 Special Judge Checker Finish, Need Standard Checkup )
View Source
const ( SpecialJudgeModeDisabled = 0 SpecialJudgeModeChecker = 1 SpecialJudgeModeInteractive = 2 SpecialJudgeTimeLimit = 1 * 1000 // Unit: ms SpecialJudgeMemoryLimit = 256 * 1024 // Unit: kb )
View Source
const ( JudgeResultMagicCode = 0xB540 JudgeBodyPackageMagicCode = 0xF540 ProblemPackageMagicCode = 0x1319 ZipArchiveMagicCode = 0x504B0304 // PK\x03\x04 )
Variables ¶
View Source
var FlagMeansMap = map[int]string{
0: "Accepted",
1: "Presentation Error",
2: "Time Limit Exceeded",
3: "Memory Limit Exceeded",
4: "Wrong Answer",
5: "Runtime Error",
6: "Output Limit Exceeded",
7: "Compile Error",
8: "System Error",
9: "Special Judge Checker Time OUT",
10: "Special Judge Checker ERROR",
11: "Special Judge Checker Finish, Need Standard Checkup",
}
View Source
var MemorySizeForJIT = map[string]int{
"gcc": 0,
"g++": 0,
"java": 393216,
"python2": 65536,
"python3": 65536,
"nodejs": 262144,
"golang": 0,
"php": 131072,
"ruby": 65536,
"rust": 0,
}
给动态语言、带虚拟机的语言设定虚拟机自身的初始内存大小
View Source
var SignalNumberMap = map[int][]string{ 1: []string{"SIGHUP", "Hangup (POSIX)."}, 2: []string{"SIGINT", "Interrupt (ANSI)."}, 3: []string{"SIGQUIT", "Quit (POSIX)."}, 4: []string{"SIGILL", "Illegal instruction (ANSI)."}, 5: []string{"SIGTRAP", "Trace trap (POSIX)."}, 6: []string{"SIGABRT", "Abort (ANSI)."}, 7: []string{"SIGBUS", "BUS error (4.2 BSD)."}, 8: []string{"SIGFPE", "Floating-point exception (ANSI)."}, 9: []string{"SIGKILL", "Kill, unblockable (POSIX)."}, 10: []string{"SIGUSR1", "User-defined signal 1 (POSIX)."}, 11: []string{"SIGSEGV", "Segmentation violation (ANSI)."}, 12: []string{"SIGUSR2", "User-defined signal 2 (POSIX)."}, 13: []string{"SIGPIPE", "Broken pipe (POSIX)."}, 14: []string{"SIGALRM", "Alarm clock (POSIX)."}, 15: []string{"SIGTERM", "Termination (ANSI)."}, 16: []string{"SIGSTKFLT", "Stack fault."}, 17: []string{"SIGCHLD", "Child status has changed (POSIX)."}, 18: []string{"SIGCONT", "Continue (POSIX)."}, 19: []string{"SIGSTOP", "Stop, unblockable (POSIX)."}, 20: []string{"SIGTSTP", "Keyboard stop (POSIX)."}, 21: []string{"SIGTTIN", "Background read from tty (POSIX)."}, 22: []string{"SIGTTOU", "Background write to tty (POSIX)."}, 23: []string{"SIGURG", "Urgent condition on socket (4.2 BSD)."}, 24: []string{"SIGXCPU", "CPU limit exceeded (4.2 BSD)."}, 25: []string{"SIGXFSZ", "File size limit exceeded (4.2 BSD)."}, 26: []string{"SIGVTALRM", "Virtual alarm clock (4.2 BSD)."}, 27: []string{"SIGPROF", "Profiling alarm clock (4.2 BSD)."}, 28: []string{"SIGWINCH", "Window size change (4.3 BSD, Sun)."}, 29: []string{"SIGIO", "I/O now possible (4.2 BSD)."}, 30: []string{"SIGPWR", "Power failure restart (System V)."}, 31: []string{"SIGSYS", "Bad system call."}, }
View Source
var TestlibBinaryPrefixs = map[string]string{
"generator": "g_",
"validator": "",
"checker": "",
"interactor": "",
}
View Source
var TestlibExitMsgMapping = []struct { ErrName string JudgeResult int WithScore bool }{ {ErrName: "ok", JudgeResult: JudgeFlagAC}, {ErrName: "wrong answer", JudgeResult: JudgeFlagWA}, {ErrName: "wrong output format", JudgeResult: JudgeFlagPE}, {ErrName: "FAIL", JudgeResult: JudgeFlagSpecialJudgeError}, {ErrName: "points", JudgeResult: JudgeFlagSpecialJudgeError}, {ErrName: "unexpected eof", JudgeResult: JudgeFlagPE}, {ErrName: "partially correct", JudgeResult: JudgeFlagWA, WithScore: true}, {ErrName: "What is the code", JudgeResult: JudgeFlagSpecialJudgeError}, }
View Source
var TestlibOutcomeMapping = map[string]int{ "accepted": JudgeFlagAC, "wrong-answer": JudgeFlagWA, "presentation-error": JudgeFlagPE, "fail": JudgeFlagSpecialJudgeError, "points": JudgeFlagSpecialJudgeError, "relative-scoring": JudgeFlagSpecialJudgeError, "unexpected-eof": JudgeFlagPE, "partially-correct": JudgeFlagWA, "reserved": JudgeFlagSpecialJudgeError, }
Functions ¶
func PlaceMemorySizeForJIT ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.