problem_yaml

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2023 License: AGPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParserAndIdentifier

func ParserAndIdentifier(opts ...Option) (problems.ConfigParser, problems.ConfigIdentifier)

Types

type Attachment

type Attachment struct {
	Name string
	Path string
}

type Checker

type Checker struct {
	Type string `yaml:"type"`
	Path string `yaml:"path"`
}

type Option

type Option func(*config)

func CompileBinaries

func CompileBinaries(compile bool) Option

type Problem

type Problem struct {
	Path                   string               `yaml:"-"`
	GeneratedStatementList problems.Contents    `yaml:"-"`
	AttachmentList         problems.Attachments `yaml:"-"`

	ShortName      string       `yaml:"shortname"`
	TitleList      []Title      `yaml:"titles"`
	StatementList  []Statement  `yaml:"statements"`
	AttachmentInfo []Attachment `yaml:"attachments"`

	Tests struct {
		TaskType      string    `yaml:"task_type"`
		InputFile     string    `yaml:"input_file"`
		OutputFile    string    `yaml:"output_file"`
		MemoryLimit   int       `yaml:"memory_limit"`
		TimeLimit     float64   `yaml:"time_limit"`
		TestCount     int       `yaml:"test_count"`
		InputPattern  string    `yaml:"input_pattern"`
		OutputPattern string    `yaml:"output_pattern"`
		InputList     []string  `yaml:"input_list"`
		OutputList    []string  `yaml:"output_list"`
		Checker       Checker   `yaml:"checker"`
		FeedbackType  string    `yaml:"feedback_type"`
		Subtasks      []Subtask `yaml:"subtasks"`
	} `yaml:"tests"`
}

func (Problem) Attachments

func (p Problem) Attachments() problems.Attachments

func (Problem) Checker

func (p Problem) Checker() problems.Checker

func (Problem) Files

func (p Problem) Files() []problems.File

func (Problem) GetTaskType

func (p Problem) GetTaskType() problems.TaskType

func (Problem) InputOutputFiles

func (p Problem) InputOutputFiles() (string, string)

func (Problem) Languages

func (p Problem) Languages() []language.Language

func (Problem) MemoryLimit

func (p Problem) MemoryLimit() int

func (Problem) Name

func (p Problem) Name() string

func (Problem) Statements

func (p Problem) Statements() problems.Contents

func (Problem) StatusSkeleton

func (p Problem) StatusSkeleton(name string) (*problems.Status, error)

func (Problem) Tags

func (p Problem) Tags() []string

func (Problem) TimeLimit

func (p Problem) TimeLimit() int

func (Problem) Titles

func (p Problem) Titles() problems.Contents

type Statement

type Statement struct {
	Language string
	Path     string
	Type     string
}

type Subtask

type Subtask struct {
	TestCount     int      `yaml:"test_count"`
	InputList     []string `yaml:"input_list"`
	OutputList    []string `yaml:"output_list"`
	InputPattern  string   `yaml:"input_pattern"`
	OutputPattern string   `yaml:"output_pattern"`
	Scoring       string   `yaml:"scoring"`
	MaxScore      float64  `yaml:"max_score"`
}

type Title

type Title struct {
	Language string
	Title    string
}

Jump to

Keyboard shortcuts

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