MCPcopy Create free account
hub / github.com/LanceLRQ/deer-executor / makeProblmConfig

Function makeProblmConfig

client/generate/problem.go:16–36  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

14)
15
16func makeProblmConfig() (*commonStructs.JudgeConfiguration, error) {
17 session, err := executor.NewSession("")
18 if err != nil {
19 return nil, err
20 }
21 config := session.JudgeConfig
22 config.TestCases = []commonStructs.TestCase{{}}
23 config.Limitation = make(map[string]commonStructs.JudgeResourceLimit)
24 config.Limitation["gcc"] = commonStructs.JudgeResourceLimit{
25 TimeLimit: config.TimeLimit,
26 MemoryLimit: config.MemoryLimit,
27 RealTimeLimit: config.RealTimeLimit,
28 FileSizeLimit: config.FileSizeLimit,
29 }
30 config.AnswerCases = []commonStructs.AnswerCase{{}}
31 config.SpecialJudge.CheckerCases = []commonStructs.SpecialJudgeCheckerCase{{}}
32 config.Problem.Sample = []commonStructs.ProblemIOSample{{}}
33 config.TestLib.ValidatorCases = []commonStructs.TestlibValidatorCase{{}}
34 config.TestLib.Generators = []commonStructs.TestlibGenerator{{}}
35 return &config, nil
36}
37
38// MakeProblemConfigFile 生成评测配置文件
39func MakeProblemConfigFile(c *cli.Context) error {

Callers 2

MakeProblemConfigFileFunction · 0.85
InitProblemWorkDirFunction · 0.85

Calls 1

NewSessionFunction · 0.92

Tested by

no test coverage detected