This file attempts to provide basic documentation of the facilities offered in this .cls file.
(Note: a "document class option" is provided to the \documentclass command e.g. \documentclass[option]{problem}.)
These options provide localisations for various languages. Support is very incomplete, but we will try to continuously upgrade it as time passes. The options are the 2-letter codes for the respective languages. The languages currently supported are English, Romanian, Bulgarian, Italian, Hungarian and Ukrainian, with codes en, ro, bg, it, hu, uk.
These options provide control on how certain aspects of the problem file are formatted:
files: if set, the problem will read/write from files of formproblemname.inandproblemname.out, rather than fromstdinandstdout.header: if set, the problem will indicate that the user must include a header calledproblemname.h.listRestrictions: if set, the restrictions are formatted as a list, rather than as a table.
Various commands exist that allow one to translate keywords in the problem file. For any keyword kw, the command \tlkw{xyz} tells LaTeX that kw is translated as xyz. The keywords currently supported are
probleminputfileoutputfileheadercheadercppexamplesexplanationspointsrestrictionssubtask
These commands allow one to specify various details about the contest and problem. These are:
\contest{name}, which sets the name of the contest toname.\location{place}, which sets the location of the contest toplace.\date{day}{month}{year}, which sets the date of the contest today/month/year.\logo{pic}, which sets the logo of the contest topic.\title{name}, which sets the name of the problem toname.\filename{name}, which sets the name of the input/output/header file toname. This command should only be used if the title of the problem contains spaces, otherwise it is superfluous.
These commands give structure to the problem.
\maketitle: makes the title of the problem.\section,\subsection: creates section or subsection headings.\begin{examples} ... \end{examples}: Begins the example table.\begin{examplesexplained} ... \end{examplesexplained}: Begins a 3-column examples table, with one column for explanations.\exmp{input}{output}%: Creates a row of an examples table.\exmpexplained{input}{output}{explanation}%: Creates a row of an examples table with explanations.\begin{restrictions}[general] ... \end{restrictions}: Introduces the restrictions for the problem.generalshould either be ommited, or should be a sequence of restrictions that are always valid for the problem, each preceded by a\item.\restr{points}{contents}: within arestrictionsenvironment, introduces a subtask worthpointspoints, with restrictioncontents`.
\np{number}: printsnumberin a consistent format.