Problem authoring guide
Steps
Fill in the five steps of a new problem in Studio, then submit it for review. It becomes public after an administrator approves it.
- Problem: title and statement
- Limits: time, memory and output limits
- Examples: input and output shown to solvers
- Judging: answer checker and hidden judging tests
- Information: source, statement language, difficulty and tags
Parts of a problem
| Part | Rule |
|---|---|
| Title | Up to 200 characters |
| Statement | Markdown. Describe the task, then ### Input and ### Output. Write math as $...$ or $$...$$. |
| Examples | 1–10. Shown to solvers. |
| Judging tests | 1–20. Hidden from solvers. |
Limits
Set time limits so the intended solution passes and a slow one does not.
| Limit | Range | Default |
|---|---|---|
| CPU time | 1 ms–10,000 ms | 1,000 ms |
| Wall time | CPU time or more, up to 30,000 ms | 3,000 ms |
| Memory | 1,024 KB–524,288 KB | 131,072 KB |
| Output | Up to 8,192 KB | 64 KB |
Answer checking
- Compare whitespace-separated tokens (
tokens): ignores differences in spaces and line breaks. - Exact match (
exact): spaces and line breaks must match too.
Problems with several correct answers or a floating-point tolerance are not supported.
Good judging tests
For a greatest common divisor problem, include:
- The smallest input and equal numbers:
1 1,7 7 - Multiples and coprime numbers:
12 36,17 5 - The larger number second:
18 12 - The largest values allowed, so trying every divisor exceeds the time limit
Compute expected outputs with a correct solution.
Source and copyright
Mark a problem you wrote yourself as an original source. You keep its copyright and permit service use under the terms. Do not copy problems from other sites. For a problem based on outside material, choose the original source and its license.
Import as JSON
Paste the JSON into Import on a new problem in Studio, or upload a .json file. You can also drop the file anywhere in Studio.
| Field | Rule |
|---|---|
format | "codykata.problem-draft" |
version | 1 |
language | "ko" or "en". Omit to keep the current language. |
tags | Up to 10 tag names. A name that is not an existing tag becomes a candidate tag. |
problem.schema_version | 2 |
problem.title | Up to 200 characters |
problem.content | [{ "id": "statement", "type": "text", "text": "…" }] |
problem.samples | Up to 10 { "input", "output" } |
problem.limits | cpu_time_ms, wall_time_ms in ms; memory_bytes, output_bytes in bytes |
problem.checker | { "type": "tokens", "version": 1 } or "exact" |
problem.tests | Up to 20 { "id", "input", "answer" } |
- End each input and output line with
\n. - A content
idstarts with a lowercase letter and usesa-z0-9-. A testidusesA-Za-z0-9_-. - Source, difficulty and images are not imported.
Example
Make a problem with an AI tool
Send this to an AI tool that can read web pages to get the JSON above and a correct solution.
Read https://codykata.com/en/authoring.md and write one Euclidean algorithm problem in that format.Check the expected outputs with the solution before importing.