atcoder

package
v0.8.4 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2021 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const BASE_URL = "https://atcoder.jp"
View Source
const LangNew = "lang"

Variables

This section is empty.

Functions

func ParseCSRFToken

func ParseCSRFToken(r io.Reader) (string, error)

func ParseLangVersion

func ParseLangVersion(r io.Reader) (string, error)

func ParseTasksPage

func ParseTasksPage(r io.Reader) ([]string, error)

Types

type AtCoder

type AtCoder struct {
	// contains filtered or unexported fields
}

func NewAtCoder

func NewAtCoder() (*AtCoder, error)

func NewAtCoderWithClient

func NewAtCoderWithClient(client *http.Client) *AtCoder

func (*AtCoder) FetchContest

func (ac *AtCoder) FetchContest(contest string) (*Contest, error)

func (*AtCoder) Login

func (ac *AtCoder) Login(name, password string) error

func (*AtCoder) Status

func (ac *AtCoder) Status(contest string) ([]*Status, error)

func (*AtCoder) Submit

func (ac *AtCoder) Submit(contestId, taskId, languageId string, code io.Reader) error

type Contest

type Contest struct {
	ID      string
	URL     string
	LangVer string
	Tasks   []*Task
}

type Example

type Example struct {
	In  string
	Exp string
}

type Status

type Status struct {
	SubmissionDate string
	Problem        string
	Language       string
	Point          string
	CodeLength     string
	Result         string
	ElapsedTime    string
	Memory         string
}

func ParseSubmissions

func ParseSubmissions(r io.Reader) ([]*Status, error)

type Task

type Task struct {
	ID       string
	Name     string
	URL      string
	Examples []*Example
}

func ParseTaskPage

func ParseTaskPage(r io.Reader) (*Task, error)

Jump to

Keyboard shortcuts

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