Login Register
Back to Help Center

Kattis Problem Package Format

How the Kattis/ICPC problem package format maps onto an imported problem, and what triggers a validation error.

What It Is

The Kattis Problem Package Format (also used across the ICPC ecosystem) is the default import format. An archive is detected as this format when it has a problem.yaml file at its root.

See the official Problem Package Format specification for the full, versioned spec. This article only covers how the importer interprets it.

Package Layout

PathPurpose
problem.yamlMetadata: name, format version, time/memory limits, judging type
problem_statement/problem.<lang>.texLaTeX problem statement, one file per language
data/sample/Public sample test cases
data/secret/Secret/grading test cases
attachments/, include/, submissions/, input_validators/, output_validator/, plugins/Copied into the problem as-is

Metadata (problem.yaml)

The importer reads problem_format_version and branches accordingly:

  • 2025-09 — uses limits.time_limit (ms) and limits.memory (MB) if present.
  • legacy, or missing/unrecognized — falls back to a 1000ms time limit and a warning is added to the import result.

The problem name comes from name in problem.yaml (a plain string, or a map of language → name, in which case en is preferred). If name is absent entirely, the importer falls back to the \problemname{...} macro inside problem_statement/problem.en.tex.

Problem Statements

At least one problem_statement/problem.<lang>.tex file is required (e.g. problem.en.tex, problem.no.tex). The legacy statement/ folder name is still accepted for backward compatibility, but produces a deprecation warning — use problem_statement/ in new packages.

Every matched .tex file is parsed and converted to Markdown. Parsing runs the same validators described under Validators — a \begin{document} wrapper, unmatched \begin/\end pairs, or a \begin{figure} environment will all fail the import with a validation error pointing at the offending file, line, and column.

Validation errors abort the whole import — no problem row is created until every statement file parses cleanly. Fix the reported file and re-upload.

Test Data & Judging Type

Files under data/sample/ become public samples shown to contestants; files under data/secret/ become the hidden grading cases. The type field in problem.yaml (e.g. pass-fail, scoring, interactive) is mapped to the problem's judging type — if it's missing or unrecognized, the platform's default type(s) are used instead.

Common Import Errors

ErrorCause
No problem.yaml file found!Archive has no problem.yaml at its root — it won't be detected as this format at all
No problem statement folder found!Neither problem_statement/ nor the legacy statement/ contains a problem.<lang>.tex file
No valid problem name foundNo name in problem.yaml and no \problemname{...} macro in problem.en.tex
Validation errors (see Validators)A .tex statement uses a LaTeX construct the platform doesn't support

Further Reading