contests

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: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Contest

type Contest struct {
	Rounds  map[string]*Round `yaml:"-"`
	Ranking map[string]uint   `yaml:"-"`
	Name    string            `yaml:"name"`
	Key     string            `yaml:"key"`
	// contains filtered or unexported fields
}

Contest holds rounds in contest and groups allowed to participate

func LoadContest

func LoadContest(fs *fs.Fs, tasks map[string]*tasks.Task) *Contest

LoadContest loads contest in given folder

type Round

type Round struct {
	Name        string
	Tasks       []string
	Start       time.Time
	End         time.Time
	ResultsShow time.Time

	Ranking RoundRanking
	// contains filtered or unexported fields
}

Round has tasks, start time, end time and time when results will be show

func LoadRound

func LoadRound(fs *fs.Fs, tasks map[string]*tasks.Task) *Round

LoadRound loads round in given folder

func (*Round) GetSubmission

func (r *Round) GetSubmission(login string, task string, id string) *tasks.Submission

GetSubmission return submission with given id

func (*Round) ListSubmissions

func (r *Round) ListSubmissions(login string, task string) []*tasks.Submission

ListSubmissions is used in command list_submissions to (surprise!) list submissions

type RoundRanking

type RoundRanking struct {
	Points [][]uint
	Names  []string
}

RoundRanking hold ranking as a two-dimensional array and additional slice contains columns description (tasks names). First columns is sum of row (labeled as "Sum")

Jump to

Keyboard shortcuts

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