Skip to content

Commit

Permalink
Minor markup changes (#301)
Browse files Browse the repository at this point in the history
  • Loading branch information
niemela authored Aug 19, 2024
1 parent b38235d commit c77235c
Showing 1 changed file with 50 additions and 46 deletions.
96 changes: 50 additions & 46 deletions spec/2023-07-draft.md
Original file line number Diff line number Diff line change
Expand Up @@ -275,15 +275,15 @@ source:
License under which the problem may be used.
Must be one of the values below.
| Value | Comments | Link |
| ------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------- |
| unknown | The default value. In practice means that the problem can not be used. | |
| public domain | There are no known copyrights on the problem, anywhere in the world. | <http://creativecommons.org/about/pdm> |
| cc0 | CC0, "no rights reserved", version 1 or later. | <https://creativecommons.org/publicdomain/zero/1.0/> |
| cc by | CC attribution license, version 4 or later. | <http://creativecommons.org/licenses/by/4.0/> |
| cc by-sa | CC attribution, share alike license, version 4 or later. | <http://creativecommons.org/licenses/by-sa/4.0/> |
| educational | May be freely used for educational purposes. | |
| permission | Used with permission. The rights owner must be contacted for every additional use. | |
Value | Comments | Link
------------- | ---------------------------------------------------------------------------------- | ----
unknown | The default value. In practice means that the problem can not be used. |
public domain | There are no known copyrights on the problem, anywhere in the world. | <http://creativecommons.org/about/pdm>
cc0 | CC0, "no rights reserved", version 1 or later. | <https://creativecommons.org/publicdomain/zero/1.0/>
cc by | CC attribution license, version 4 or later. | <http://creativecommons.org/licenses/by/4.0/>
cc by-sa | CC attribution, share alike license, version 4 or later. | <http://creativecommons.org/licenses/by-sa/4.0/>
educational | May be freely used for educational purposes. |
permission | Used with permission. The rights owner must be contacted for every additional use. |
`rights_owner` is the owner of the copyright of the problem.
Values other than _unknown_ or _public domain_ require `rights_owner` to have a value.
Expand All @@ -294,20 +294,20 @@ Values other than _unknown_ or _public domain_ require `rights_owner` to have a
Time, memory, and other limits to be imposed on submissions.
A map with the following keys:
| Key | Comments | Default | Typical system default |
| ------------------ | -------------------------- | -------------- | ---------------------- |
| time_multipliers | optional | see below | |
| time_limit | optional float, in seconds | see below | |
| time_resolution | optional float, in seconds | 1.0 | |
| memory | optional, in MiB | system default | 2048 |
| output | optional, in MiB | system default | 8 |
| code | optional, in KiB | system default | 128 |
| compilation_time | optional, in seconds | system default | 60 |
| compilation_memory | optional, in MiB | system default | 2048 |
| validation_time | optional, in seconds | system default | 60 |
| validation_memory | optional, in MiB | system default | 2048 |
| validation_output | optional, in MiB | system default | 8 |
| validation_passes | optional | 2 | |
Key | Comments | Default | Typical system default
------------------ | -------------------------- | -------------- | ----------------------
time_multipliers | optional | see below |
time_limit | optional float, in seconds | see below |
time_resolution | optional float, in seconds | 1.0 |
memory | optional, in MiB | system default | 2048
output | optional, in MiB | system default | 8
code | optional, in KiB | system default | 128
compilation_time | optional, in seconds | system default | 60
compilation_memory | optional, in MiB | system default | 2048
validation_time | optional, in seconds | system default | 60
validation_memory | optional, in MiB | system default | 2048
validation_output | optional, in MiB | system default | 8
validation_passes | optional | 2 |
For most keys, the system default will be used if nothing is specified.
This can vary, but you **should** assume that it's reasonable.
Expand All @@ -317,10 +317,10 @@ Only specify limits when the problem needs a specific limit, but do specify limi
`time_multipliers` is a map with the following keys:
| Key | Comments | Default |
| ----------------- | -------- | ------- |
| ac_to_time_limit | float | 2.0 |
| time_limit_to_tle | float | 1.5 |
Key | Comments | Default
----------------- | -------- | -------
ac_to_time_limit | float | 2.0
time_limit_to_tle | float | 1.5
The value of `time_limit` is an integer or floating-point problem time limit in seconds.
The time multipliers specify safety margins relative to the slowest accepted submission, `T_ac`, and fastest time_limit_exceeded submission, `T_tle`.
Expand Down Expand Up @@ -356,11 +356,11 @@ where `name` is one of the names defined in `constants`.
Tags {% raw %}`{{xyz}}`{% endraw %} containing a name that is not defined are not modified but may be warned for.
All constant sequences in the following files will be replaced by the value of the corresponding constant:
- problem statements
- input and output validators
- included code
- example submissions
- `testdata.yaml`
- problem statements
- input and output validators
- included code
- example submissions
- `testdata.yaml`
Constant sequences are **not** replaced in test data files or in `problem.yaml` itself.
Expand All @@ -384,14 +384,18 @@ Image file formats supported are `.png`, `.jpg`, `.jpeg`, and `.pdf`.
### Sample Data
- For problem statements provided in LaTeX or Markdown: the statement file must contain only the problem description and input/output specifications and no [sample data](#test-data).
- For problem statements provided in LaTeX or Markdown:
the statement file must contain only the problem description and input/output specifications and no [sample data](#test-data).
It is the judge system's responsibility to append the sample data.
- For problem statements provided as PDFs: the judge system will display the PDF verbatim; therefore any sample data must be included in the PDF.
- For problem statements provided as PDFs:
the judge system will display the PDF verbatim;
therefore any sample data must be included in the PDF.
The judge system is not required to reconcile sample data embedded in PDFs with the `sample` test data group nor to validate it in any other way.
### LaTeX Environment and Supported Subset
Problem statements provided in LaTeX must consist only of the problem statement body (i.e., the content that would be placed within a `document` environment).
Problem statements provided in LaTeX must consist only of the problem statement body
(i.e., the content that would be placed within a `document` environment).
It is the judging system's responsibility to wrap this text in an appropriate LaTeX class.
The LaTeX class shall provide the convenience environments `Input`, `Output`, and `Interaction` for delineating sections of the problem statement.
Expand Down Expand Up @@ -452,16 +456,16 @@ If the test case exists, then an associated `.ans` file must exist while the oth
If the test case does not exist, then the other files must not exist.
The table below summarizes the supported test data:
| Extension | Described In | Summary |
|---------------------------------|----------------------|---------------------------------------------|
| `.in` | Input | Input piped to standard input |
| `.ans` | Output Validator | Input to the Output Validator |
| `.hint` | Annotations | Hint for solving the test case |
| `.desc` | Annotations | Purpose of the test |
| `.png`, `.jpg`, `.jpeg`, `.svg` | Annotations | Illustration of the test case |
| `.yaml` | Configuration | Additional configuration of the test case |
| `.args` | Input | Input passed as command-line arguments |
| `.files` | Input | Input available via file I/O |
Extension | Described In | Summary
------------------------------- | -------------------- | -----------------------------------------
`.in` | Input | Input piped to standard input
`.ans` | Output Validator | Input to the Output Validator
`.hint` | Annotations | Hint for solving the test case
`.desc` | Annotations | Purpose of the test
`.png`, `.jpg`, `.jpeg`, `.svg` | Annotations | Illustration of the test case
`.yaml` | Configuration | Additional configuration of the test case
`.args` | Input | Input passed as command-line arguments
`.files` | Input | Input available via file I/O
Judge systems may assume that the result of running a program on a test case is deterministic.
For any two test cases, if the contents of their `.in` and `.args` files and `.files` directory are equivalent,
Expand Down Expand Up @@ -600,7 +604,7 @@ Sample test cases can be used in three places:

By default the sample data for all three cases is taken from the `.in` and `.ans` file pairs under `data/sample`.
Some problems require (slightly) different data in each of these cases.
We allow customizing this in subdirecties `data/sample/statement` and `data/sample/download`.
We allow customizing this in subdirectories `data/sample/statement` and `data/sample/download`.
In this case it is recommended to symlink identical files from these subdirectories to those in `data/sample`.

#### Samples used by the judge
Expand Down

0 comments on commit c77235c

Please sign in to comment.