Documentation
¶
Index ¶
Constants ¶
View Source
const ( UnrecognizedError = -1 Accepted = iota WrongAnswer CompileError RuntimeError TimeLimitExceeded PresentationError MemoryLimitExceeded OutputLimitExceeded )
Result Code
View Source
const (
PojCode = 1
)
Online Judge Code
Variables ¶
This section is empty.
Functions ¶
func StatusError ¶
Types ¶
type OnlineJudge ¶
type OnlineJudge interface { Login() error //Logout() //SetCookie() GetProblem(problemID int) (*ProblemInfo, error) Submit(args *SubmitArgs) (int, error) QuerySubmitStatus(int) (*StatusResp, error) LoginStatus() (bool, error) }
func GetOJWithoutUserInfo ¶
func GetOJWithoutUserInfo(oj int) OnlineJudge
type POJ ¶
type POJ struct {
// contains filtered or unexported fields
}
Login() Logout() SetCookie() GetProblem() Submit() QuerySubmitStatus() LoginStatus() bool
func (*POJ) GetProblem ¶
func (r *POJ) GetProblem(problemID int) (*ProblemInfo, error)
func (*POJ) LoginStatus ¶
func (*POJ) QuerySubmitStatus ¶
func (r *POJ) QuerySubmitStatus(rid int) (*StatusResp, error)
type ProblemArgs ¶
type ProblemInfo ¶
type ProblemInfo struct { OJ int ProblemID int ProblemName string Description string Source string TimeLimit string MemoryLimit string Input string Output string SampleInput []string SampleOutput []string Language []struct { TypeName string ID int } }
func GetProblemInfo ¶
func GetProblemInfo(args *ProblemArgs) (*ProblemInfo, error)
type StatusResp ¶
Click to show internal directories.
Click to hide internal directories.