A collection of problem packages which can be directly imported into OJ Lab site.
Generate .ans
with answer source and folder with .in
files.
# $1: answer source file
# $2: input folder
./tools/run/cpp.sh problems/nth-element/submissions/accepted/use_std.cpp problems/nth-element/data/secret
OJ Lab use a slightly different package format similiar with Kattis/problem-package-format, but support fewer fields & features currently.
- OJ Lab only support Markdown format for problem statement.
- In
problem.yaml
OJ Lab use an extra field:oj-lab-metadata
to store the configuration for the OJ Lab platform.
The packages can be validated by Kattis/problemtools.
docker pull problemtools/icpc
docker run --rm -v ./problems:/problems problemtools/icpc verifyproblem ./problems/hello-world
This can mainly help you by quickly validate your test data and submission files.
Since OJ Lab use a slightly different package format, you will need to ignore some of the error & warning like:
ERROR in hello-world: Invalid shortname 'hello-world' (must be [a-z0-9]+)
WARNING in problem configuration: Unknown field 'oj-lab-metadata' provided in problem.yaml
ERROR in problem statement: No problem statements found (expected problem.tex or problem.[a-z][a-z].tex in problem_statement directory)
For problem statement, make sure you have at least one of problem.en.md
or problem.md
in the package.