tasks

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

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

Go to latest
Published: Jan 1, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Submission

type Submission struct {
	Id            string            `yaml:"id"`
	User          string            `yaml:"user"`
	Task          string            `yaml:"task"`
	Round         string            `yaml:"round"`
	Contest       string            `yaml:"contest"`
	Code          string            `yaml:"code"`
	Results       map[string]string `yaml:"results,omitempty"`        //status for each test like OK, Bad result, timeout etc
	Time          map[string]uint   `yaml:"time,omitempty"`           //time of execution of each test
	MaxTime       map[string]uint   `yaml:"max_time,omitempty"`       //max time of execution - empty, used only during marshall to send to user TODO
	Points        map[string]uint   `yaml:"points,omitempty"`         //points for each testgroup
	Sum           uint              `yaml:"sum,omitempty"`            //sum of points
	InitialStatus string            `yaml:"initial_status,omitempty"` //status of initial tests
	FinalStatus   string            `yaml:"final_status,omitempty"`   //status of final tests
}

Submission holds users submissions data

func LoadSubmission

func LoadSubmission(buff []byte) *Submission

LoadSubmission load submission data from yaml string

type Task

type Task struct {
	Name         string
	Config       taskConfig
	InitialTests map[string]TestGroup
	FinalTests   map[string]TestGroup

	Statement         string
	StatementFileName string
	// contains filtered or unexported fields
}

Task - struct for holding task data and performing tests

func LoadTask

func LoadTask(fs *fs.Fs, conf *config.Config, name *string) *Task

LoadTask loads task data

type Test

type Test struct {
	Name        string
	TimeLimit   uint
	MemoryLimit uint
}

Test is single input and output with time and memory limit

type TestGroup

type TestGroup struct {
	Name   string
	Tests  map[string]Test
	Points uint
}

TestGroup groups single tests. To get points all tests in group must be passed

Jump to

Keyboard shortcuts

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