ccc

package module
v0.0.0-...-d7a13fa Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2020 License: MIT Imports: 3 Imported by: 0

README

ccc

Competitive Coding Client

Usage

Command line tool

Submit
comp submit http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=1500 answer.go

# Example Output:
# ========================================
# Status:   AC
# CodeSize: 390 Byte
# Time:     7 ms
# Memory:   3744 KB
# ========================================

submit command waits until the contest platform to finish judging, so this can take some time.

Test
Url
comp test https://atcoder.jp/contests/abc170/tasks/abc170_a answer.go

# Example Output:
# ========================================
# Case 1
#
# Input:
# 0 2 3 4 5
#
# Your Answer:
# 1
#
# Status:
# OK
# ========================================
# ========================================
# Case2
#
# Input:
# 1 2 0 4 5
#
# Answer:
# 3
#
# Your Answer:
# 4
#
# Status:
# NG
# ========================================
File
comp test ./a.in ./answer.go

If you pass a file with the extension .in (e.g. "sample.in"), comp command will look for a file with the same name and with the extension .out (i.e. "sample.out") in the same directory. If exists, comp command regards it as expected output for the input file and uses it in the test.

If the corresponding .out file does not exist, comp does not validate the output of your code.

Directory
comp test ./dir ./answer.go

Supported contest platform

  • AtCoder
  • Aizu Online Judge (AOJ)

Supported programming language

  • Go

License

MIT

Author

Kazumasa Hirata

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Code

type Code struct {
	Lang Lang
	Body string
}

func NewCodeFromFile

func NewCodeFromFile(filename string) (*Code, error)

type CodeSize

type CodeSize int

func (CodeSize) String

func (cs CodeSize) String() string

type Lang

type Lang int
const (
	Unknown Lang = iota
	Go
)

func (Lang) String

func (l Lang) String() string

type MemoryScore

type MemoryScore int

func (MemoryScore) String

func (ms MemoryScore) String() string

type Status

type Status int
const (
	AC  Status = iota // Accepted
	WA                // Wrong Answer
	TLE               // Time Limit Exceed
	MLE               // Memory Limit Exceed
	RE                // Runtime Error
	CE                // Compile Error
)

func (Status) String

func (rs Status) String() string

type Submission

type Submission struct {
	Status      Status
	CodeSize    CodeSize
	TimeScore   TimeScore
	MemoryScore MemoryScore
}

type TestCase

type TestCase struct {
	Input  string
	Output string
}

type TimeScore

type TimeScore int

func (TimeScore) String

func (ts TimeScore) String() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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