Skip to content
Open
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 55 additions & 9 deletions Contest_API.md
Original file line number Diff line number Diff line change
Expand Up @@ -906,12 +906,14 @@ The following endpoints are associated with judgement types:

Properties of judgement type objects:

| Name | Type | Description
| :------ | :-------- | :----------
| id | ID | Identifier of the judgement type, a 2-3 letter capitalized shorthand, see table below.
| name | string | Name of the judgement. (might not match table below, e.g. if localized).
| penalty | boolean | Whether this judgement causes penalty time. Required iff contest:penalty\_time is present.
| solved | boolean | Whether this judgement is considered correct.
| Name | Type | Description
| :------------------------------ | :-------- | :----------
| id | ID | Identifier of the judgement type, a 2-3 letter capitalized shorthand, see table below.
| name | string | Name of the judgement. (might not match table below, e.g. if localized).
| penalty | boolean | Whether this judgement causes penalty time. Required iff contest:penalty\_time is present.
| solved | boolean | Whether this judgement is considered correct.
| simplified\_judgement\_type\_id | ID? | Identifier of this type's simplified judgement type. When using simplified judgements, this is required iff simplified\_only is false.
| simplified\_only | boolean | Whether this judgement is only used as simplified judgement type, never as normal judgement. Defaults to false.

#### Known judgement types

Expand Down Expand Up @@ -961,6 +963,27 @@ safely be translated to, if a system does not support it.
| SE | Submission Error | | \- | \- | Something went wrong with the submission
| CS | Contact Staff | Other | \- | \- | Something went wrong

#### Simplified judgement types

In contests with limited visibility or access rules, a simplified judgement type ID defines how each judgement type
will be simplified for users without access.

For instance, in a contest where teams cannot see the specific reason another team's submission was rejected, teams
might see their own judgement types, but judgements from other teams would return the corresponding simplified judgement
type instead.

If not using simplified judgements, the properties `simplified\_judgement\_type\_id` and `simplified\_only` must not be set.

A judgement type may be used both as original and simplified judgement type, but must then simplify to itself and have
`simplified\_judgement\_type\_id` equal to `id`.
For example, `AC` (aka correct) would typically map to `AC` also as simplified judgement type.

The property `simplified\_only` must be set to `true` if a judgement type is only used as simplified judgement type.
In that case `simplified\_judgement\_type\_id` must not be set. A typical example would be `RE` aka rejected.
If `simplified\_only` is (per default) `false` then `simplified\_judgement\_type\_id` must have a value,
that is, all original judgement types must simplify to something (which may be itself).
Furthermore, the simplified judgement type must have the same `penalty` and `solved` values as the original jugdement type.

#### Examples

Request:
Expand All @@ -971,15 +994,36 @@ Returned data:

```json
[{
"id": "RE",
"name": "Rejected",
"penalty": true,
"solved": false,
"simplified_only": true
}, {
"id": "TLE",
"name": "Time Limit Exceeded",
"penalty": true,
"solved": false,
"simplified_judgement_type_id": "RE"
}, {
"id": "WA",
"name": "Wrong Answer",
"penalty": true,
"solved": false,
"simplified_judgement_type_id": "RE"
}, {
"id": "CE",
"name": "Compiler Error",
"penalty": false,
"solved": false
"solved": false,
"simplified_judgement_type_id": "CE"
}, {
"id": "AC",
"name": "Accepted",
"penalty": false,
"solved": true
"solved": true,
"simplified_judgement_type_id": "AC"
"simplified_only": false
}]
```

Expand All @@ -994,7 +1038,9 @@ Returned data:
"id": "AC",
"name": "Accepted",
"penalty": false,
"solved": true
"solved": true,
"simplified_judgement_type_id": "AC"
"simplified_only": false
}
```

Expand Down