()
| 14 | ) |
| 15 | |
| 16 | func 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 生成评测配置文件 |
| 39 | func MakeProblemConfigFile(c *cli.Context) error { |
no test coverage detected