judge

package
v0.0.0-...-97031d4 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2021 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MainOptions

func MainOptions(options *Options)

MainOptions runs the judge with the given options

Types

type OptionalFile

type OptionalFile struct {
	Name     string
	Fallback string
}

OptionalFile specifies the name of an optional file and the fallback file if the file is not found

type Options

type Options struct {
	Chdir        string
	ExcludeCases []string // exclude these cases
	IncludeCases []string // include these cases
	AsUser       string   // run the judge as this user. privileged.
	RuleFile     string   // use the rules defined in the config file instead of argv[0]. privileged.
	Server       string   // the judge server
	Homework     string   // the name of the homework
	Bin          string   // skip compiling and use the given binary. privileged.
	MedianOf     int      // run each case multiple times and pick the median as the result
	Debug        bool     // output debug messages
}

Options is passed to MainOptions

type Rule

type Rule struct {
	Target      string
	Mandantory  []string
	Optional    []OptionalFile
	Runner      string
	SkipCompile bool
	MedianOf    int
	Debug       bool
}

Rule defines a rule of a given homework

Jump to

Keyboard shortcuts

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