A SIO2 contest's packageset
Please run ./new-package.sh
before the first commit! (no need to create a package, just run and exit)
To see the package status, along with compiled task statements and packages,
see the Tasks
GitHub release. To change the state of
the task, either push a properly-formatted commit, or edit the release notes.
When running ./new-package.sh
, multiple githooks(5)
are installed in the local git
configuration.
The hooks are located under ./.githooks/
and enforce the following:
- All commits must be named
<id>: <desc>
, where<id>
is an identifier of a package (must be 3 lowercase ASCII letters), or the literal*
, which should be used when making global repository changes.
To create a package, run ./new-package.sh
and enter the required data.
You may want to run it as sh -x ./new-package.sh
, if you want to trace the script's execution.
The packages are created from a template located under _templates, with the following ones currently available:
Name | Description |
---|---|
standard | Standard task template with input generation |
The following libraries are also available to be included:
Name | Description |
---|---|
oilib | Include the oi.h header and usage examples |
testlib | Include the testlib.hpp header and usage examples |
Below we assume that the package's identifier is xxx
.
Package's tests are then named as follows:
- xxx1ocen.in (included in statement)
- xxx2ocen.in
- xxx3ocen.in
- xxx1a.in
- xxx1b.in
- xxx2a.in
- xxx2b.in
- xxx2c.in
While package's solutions are named as follows:
- xxx.cpp (the model solution)
- xxx1.cpp (other correct solutions)
- xxxb1.cpp (wrong solutions...)
- xxxb2.cpp (also partial solutions)
- xxxs1.cpp ("too slow" solutions)
Target | Description |
---|---|
ingen |
Generate in/xxx*.in via the prog/xxxingen.cpp generator |
outgen |
Generate out/xxx*.out by passing in/xxx*.in files to prog/xxx.cpp model solution |
run |
Run prog/xxx.cpp against the generated input and output files |
run_yyy |
Run prog/xxxyyy.cpp against the generated input and output files |
oirun oirun_yyy |
Same as run and run_yyy , except run through the oiejq wrapper around sio2jail. |
report oireport |
Generate an HTML report page, containing the results of checking all existing solutions |
clean |
Remove binary files like compiled programs from the package directory and subdirectories. |
cleangen |
Remove tests generated by prog/xxxingen.cpp from in/xxx*.in and out/xxx.out . Doesn't remove files which weren't programatically generated. |
export |
Build the entire task package, ready to be uploaded to the SIO2 system |
-C doc |
Build the task statement PDF from the doc/xxxzad.tex TeX source |
In a future version of the template,
there might also be an alternative Makefile/script included in either the
standard
template or a helper library.