judge

package
v0.0.0-...-4bbc8ee Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2022 License: GPL-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BasePath   = "/sxu-judger"
	CodePath   = BasePath + "/code"
	TmpPath    = BasePath + "/run"
	OutputPath = BasePath + "/output"
	SamplePath = BasePath + "/sample"
)
View Source
const (
	SUCCEED = iota
	LOOKUP_FAILED
	COMPILE_FAILED
)
View Source
const (
	StatusAC  = 1
	StatusWA  = 2
	StatusCE  = 3
	StatusRE  = 4
	StatusTLE = 5
	StatusMLE = 6
	StatusOLE = 7
	StatusPE  = 8
	StatusSE  = 9
)

Variables

This section is empty.

Functions

func GetJudgeStatus

func GetJudgeStatus(result string) string

Types

type CompileResult

type CompileResult model.Result

CompileResult

type Compiler

type Compiler struct {
	// contains filtered or unexported fields
}

func (*Compiler) Run

func (c *Compiler) Run() (_result *CompileResult)

type Judger

type Judger struct {
	Compiler
	Runner
}

func NewJudger

func NewJudger(submit *model.Submit) *Judger

type RunResult

type RunResult struct {
	SampleId string `json:"sample_id,omitempty"`
	model.Result
}

type Runner

type Runner struct {
	// contains filtered or unexported fields
}

func (*Runner) Compare

func (runner *Runner) Compare(sampleId string) bool

func (*Runner) Run

func (runner *Runner) Run() *[]RunResult

Jump to

Keyboard shortcuts

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