uoj

package
v0.1.8 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2024 License: AGPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateErrorResult added in v0.1.7

func GenerateErrorResult(err error) (common.SolutionInfo, common.SolutionDetails, error)

func ReadResult

func ReadResult(resultDir string, problemConf map[string]string) (common.SolutionInfo, common.SolutionDetails, error)

Types

type Details

type Details struct {
	Tests    []Test    `xml:"test"`
	Subtasks []Subtask `xml:"subtask"`
	Error    string    `xml:"error"`
}

type Result

type Result struct {
	XMLName xml.Name `xml:"result"`
	Score   float64  `xml:"score"`
	Time    float64  `xml:"time"`
	Memory  float64  `xml:"memory"`
	Error   string   `xml:"error"`
	Details Details  `xml:"details"`
}

type SolutionMetadata

type SolutionMetadata struct {
	Language string `json:"language"`
}

type Subtask added in v0.1.7

type Subtask struct {
	Num    int     `xml:"num,attr"`
	Score  float64 `xml:"score,attr"`
	Info   string  `xml:"info,attr"`
	Time   float64 `xml:"time,attr"`
	Memory float64 `xml:"memory,attr"`
	Type   string  `xml:"type,attr"`
	Tests  []Test  `xml:"test"`
}

type Test

type Test struct {
	Num    int     `xml:"num,attr"`
	Score  float64 `xml:"score,attr"`
	Info   string  `xml:"info,attr"`
	Time   float64 `xml:"time,attr"`
	Memory float64 `xml:"memory,attr"`
	In     string  `xml:"in"`
	Out    string  `xml:"out"`
	Res    string  `xml:"res"`
}

type UOJAdapterConfig

type UOJAdapterConfig struct {
	SandboxMode string `json:"sandbox_mode"`
}

type UojAdapter

type UojAdapter struct{}

func (*UojAdapter) Judge

func (u *UojAdapter) Judge(ctx context.Context, task judge.JudgeTask) error

func (*UojAdapter) Name

func (u *UojAdapter) Name() string

Jump to

Keyboard shortcuts

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