Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Executable ¶
type Interactor ¶
type Problem ¶
type Problem struct {
Names []Name `xml:"names>name"`
Statements []Statement `xml:"statements>statement"`
TestSets []TestSet `xml:"judging>testset"`
Assets *ProblemAssets `xml:"assets"`
Files *ProblemFiles `xml:"files"`
}
Problem represents a problem.
func ReadProblemConfig ¶
ReadProblemConfig reads problem config from file.
type ProblemAssets ¶
type ProblemAssets struct {
Checker *Checker `xml:"checker"`
Interactor *Interactor `xml:"interactor"`
Solutions []Solution `xml:"solutions>solution"`
}
type ProblemFiles ¶
type ProblemFiles struct {
Resources []Resource `xml:"resources>file"`
Executables []Executable `xml:"executables>executable"`
}
type ProblemStatementConfig ¶
type ProblemStatementConfig struct {
Name string `json:"name"`
Legend string `json:"legend"`
Input string `json:"input"`
Output string `json:"output"`
Notes string `json:"notes"`
Scoring string `json:"scoring"`
Interaction string `json:"interaction"`
Tutorial string `json:"tutorial"`
TimeLimit int `json:"timeLimit"`
MemoryLimit int64 `json:"memoryLimit"`
InputFile string `json:"inputFile"`
OutputFile string `json:"outputFile"`
SampleTests []SampleTest `json:"sampleTests"`
}
func ReadProblemStatementConfig ¶
func ReadProblemStatementConfig(path string) (ProblemStatementConfig, error)
type SampleTest ¶
type Statement ¶
type Statement struct {
Language string `xml:"language,attr"`
Charset string `xml:"charset,attr"`
Path string `xml:"path,attr"`
MathJax bool `xml:"mathjax,attr"`
Type string `xml:"type,attr"`
}
Statement represents problem statement.
type Test ¶
type Test struct {
Method string `xml:"method,attr"`
Sample bool `xml:"sample,attr"`
Cmd string `xml:"cmd,attr"`
Points float64 `xml:"points,attr"`
Group string `xml:"group,attr"`
}
Test represents test.
type TestSet ¶
type TestSet struct {
Name string `xml:"name,attr"`
TimeLimit int64 `xml:"time-limit"`
MemoryLimit int64 `xml:"memory-limit"`
TestCount int `xml:"test-count"`
InputPathPattern string `xml:"input-path-pattern"`
AnswerPathPattern string `xml:"answer-path-pattern"`
Tests []Test `xml:"tests>test"`
Groups []Group `xml:"groups>group"`
}
TestSet represents a group of tests.
Click to show internal directories.
Click to hide internal directories.