utility

package
v0.0.0-...-8af399b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 17, 2025 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OK      = 1
	TIMEOUT = 2
	DIE     = -99
	SYS_DIE = -98
)
View Source
const (
	LF       = 10 // LINEFEED
	EOT      = 3  // END-OF-TEXT like EOF
	SPACEBAR = 20
)

Variables

This section is empty.

Functions

func AutoloadProblem

func AutoloadProblem(questID int) (string, int, error)

func CompileCode

func CompileCode(lang string, isolateID int, codeContent string) (bool, int, string)

func InitalIsolate

func InitalIsolate(isolateID int) int

func LookUpMeta

func LookUpMeta(isolateID int) (int, string)

func NewProblemDir

func NewProblemDir(file *multipart.FileHeader, questID int) (bool, error)

func RemoveProblemDir

func RemoveProblemDir(questID int) (bool, error)

func RunnerIsolate

func RunnerIsolate(isolateID int, boxFile int, questID int, max_time float32, max_mem int) (bool, int, int, string, error)

func VerifyResult

func VerifyResult(questID int, testcaseNo int, output string) bool

Types

type TestcaseDesc

type TestcaseDesc struct {
	ProblemTitle   string  `json:"problem_title"`
	MaxTime        float32 `json:"max_time"`
	MaxMemory      int     `json:"max_memory"`
	AmountTestcase int     `json:"amount_testcase"`
}

func FullLoadProblem

func FullLoadProblem(questID int) (TestcaseDesc, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL